JSWindowActor crashes when sending messages early in lifecycle for in-process actors
Categories
(Core :: DOM: Content Processes, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
References
Details
Attachments
(2 files)
Currently when we send a message within the current process, we get the "other side" of the actor synchronously within the sending side. If the constructor hasn't been received yet, however, this means we'll get a null, and a crash will occur.
It seems like the best option here would be to do one of two things:
- Only hold mManager when sending the message, and get the other side actor when in the handler on the other side of the event loop, or:
- Synchronously create both sides using ManagedEndpoint<PWindowGlobal> to skip going through IPC to create the WindowGlobalParent object.
As, in general, it would be nice to keep stuff to usual IPC ordering, and avoid needing to do synchronous work in the in-process case, I think the easiest initial option here is (1). I'll attach a bug for this case shortly.
Assignee | ||
Comment 1•6 years ago
|
||
This patch changes the timing of when the other side actor is created to
be after posting the message to the event loop, to avoid situations
early during actor creation when the parent side hasn't been created yet
triggering null pointer crashes.
Assignee | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Hey nika, these patches look good to go from out here - are these almost ready to land?
Assignee | ||
Comment 4•6 years ago
|
||
Yeah, I think they're good to land, just been busy & haven't gotten around to landing them yet. I'll rebase them & queue them up for autoland, so hopefully everything works out :-)
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3476eec1fb49
https://hg.mozilla.org/mozilla-central/rev/00c0737c9721
Description
•