mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-21 16:32:34 +00:00
Our structured serialization implementation had its own bespoke encoder and decoder to serialize JS values. It also used a u32 buffer under the hood, which made using its structures a bit awkward. We had previously worked around its data structures in transferable streams, which nested transfers of MessagePort instances. We basically had to add hooks into the MessagePort to route to the correct transfer receiving steps, and we could not invoke the correct AOs directly as the spec dictates. We now use IPC mechanics to encode and decode data. This works because, although we are encoding JS values, we are only ultimately encoding primitive and basic AK types. The resulting data structures actually enforce that we implement transferable streams exactly as the spec is worded (I had planned to do that in a separate commit, but the fallout of this patch actually required that change). |
||
---|---|---|
.. | ||
WebWorkerClient.cpp | ||
WebWorkerClient.h | ||
WebWorkerClient.ipc | ||
WebWorkerServer.ipc |