Typed serialization for JS actor messages
Categories
(Core :: DOM: Content Processes, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
My first patch in bug 1885221 replaces the serialization method currently used for JS actor messages (based on structured clone) with a new one that uses IPDL structures, at least for messages from the child process to the parent process. I think Nika suggested that it get landed separately, and I think that's a good idea. The current serialization has some weird behavior when structured cloning fails, that goes through JSON. We should land and enable the new serializer before we try to do typing, to shake out any problems there.
| Assignee | ||
Comment 1•7 months ago
|
||
The actual patch here does not actually use the new serializer in any deep way. Instead, all messages values are serialized using StructuredClone and put in a thin "wrapper". Actually enabling the new serializer will be in a followup once it has settled, via a pref flip. That will make it easier to disable if something goes wrong.
| Assignee | ||
Comment 2•7 months ago
|
||
This patch implements serialization and deserialization of JS values using IPDL.
This is similar to the structured clone algorithm, but the target is chrome JS,
so it does not need to be standards compliant. The idea is that by serializing
to a data type, it is easier to write a type checking algorithm in later patches
in bug 1885221 by traversing the data structure. This also allows us to tightly
control what is allowed to be sent.
This patch removes MMPrinter::Print logging for JS IPC messages, but a more
sophisticated logging will be added in bug 1885221 part 5, once the type
infrastructure is in place.
| Assignee | ||
Comment 3•7 months ago
|
||
Try looks green. Also with the pref flipped, as seen in bug 1999397.
Comment 5•7 months ago
|
||
| bugherder | ||
Updated•6 months ago
|
Description
•