ChildDebuggerTransport isn't closed on the parent process side (at least for content process targets)
Categories
(DevTools :: Framework, defect)
Tracking
(firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(2 files)
Test failure in bug 1672660 highlighted that the ChildDebuggerTransport isn't closed on the parent process side.
When the process helper module's destroyTargets
method is called, we broadcast an event to all content processes, but don't do anything on the parent process side (where process-helper.js executes).
But we should be destroying the ChildDebuggerTransport that is created from onContentProcessActorCreated
method. Otherwise, if late messages are sent by the content process, we may still try to interpret them whereas they should be ignored.
Not doing this correctly leads to following errors:
"TypeError: can't access property "send", this.transport is null" {file: "resource://devtools/server/devtools-server-connection.js" line: 99}]
This happens because the ChildDebuggerTransport is still receiving messages and forward it to the main DevToolsServerConnection running in the parent process. Connection which is destroyed just after we call unwatchTargets, as the toolbox is most likely closing.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Previous purgeRequestForDestroy
method was only rejecting all pending requests.
The new syncFrontDestroy
allows to fully destroy the front, including
unregistering it/unmanage it. So that if we receive a packet from a brand new
actor, with the same prefix and actor ID, DevToolsClient.getFront doesn't return
the old destroyed front.
This issue was making pending requests that were never resolved.
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b6d78ba82b0d [devtools] Close ChildDebuggerTransport in the parent process when we destroy content process targets. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/fdc2974ccfc0 [devtools] Unmanage fronts when we purge a whole prefix. r=nchevobbe
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b6d78ba82b0d
https://hg.mozilla.org/mozilla-central/rev/fdc2974ccfc0
Description
•