JSWindowActorParent.sendQuery() after didDestroy throws an uncatchable error NS_ERROR_NOT_AVAILABLE
Categories
(Core :: DOM: Content Processes, defect)
Tracking
()
People
(Reporter: zombie, Unassigned)
Details
Add this:
https://phabricator.services.mozilla.com/D67671
and run:
mach test dom/ipc/tests/JSWindowActor/browser_sendQuery.js
Despite both catching the call and handling the resulting promise, test fails with A promise chain failed to handle a rejection: [Exception... "Component is not available"...
. It's coming from:
https://searchfox.org/mozilla-central/rev/6cd54550a2/dom/ipc/JSWindowActor.cpp#390-391
Obviously, calling sendQuery after didDestroy is not gonna be useful, but that's what promise rejection (and/or throwing) is supposed to be for. I don't understand the point of an opaque error message that fails the test and doesn't point at the problem, and is basically unaffected by any JS debug code I was trying to add (only after Nika showed me what to look for was I able to find it).
This is made worse by willDestroy not reliably getting called for parent actors, and I also think this can happen when two actors from the same tab get destroyed at the same time, and the first one tries to send a message to the second from didDestroy (not knowing that it's also gone, since that didDestroy hasn't fired yet).
Reporter | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
WONTFIX because Nika says this is intended behavior.
Description
•