DebuggerClient created for local target inspection is never destroyed
Categories
(DevTools :: about:debugging, task, P3)
Tracking
(firefox71 fixed)
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: jdescottes, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Spotted while pairing on Bug 1566450.
We had to skip aboutdebugging_process_main_local on debug builds because the new patch surfaced an existing leak when debugging a local target from about:debugging.
When inspecting a local target, the DebuggerClient instance is created on the fly when we open the about:devtools-toolbox tab. This is done in target-from-url: https://searchfox.org/mozilla-central/rev/e62c920f7f6463239c6634113f8a8351e263b936/devtools/client/framework/target-from-url.js#196
Later on, when we close the toolbox (here the about:devtools-toolbox tab), we destroy the target front, which ultimately leads to: https://searchfox.org/mozilla-central/rev/e62c920f7f6463239c6634113f8a8351e263b936/devtools/shared/fronts/targets/target-mixin.js#576-598
The idea here is that if this is a regular "local tab" toolbox, the client can be destroyed when the target front is destroyed, otherwise it should be done by whatever created the DebuggerClient.
Here in theory we should find a way to destroy the DebuggerClient created by target-from-url after the toolbox was destroyed.
All the code and logic mentioned here might be impacted by the patches in Bug 1565263 and Bug 1570696.
Once this is fixed, we should be able to enable aboutdebugging_process_main_local.js on debug platforms again!
Assignee | ||
Comment 1•5 years ago
|
||
When debugging firefox instance, we open about:devtools toolboxes,
without any remoteId attribute. So that we create a brand new DebuggerClient
instance. For now, this instance is only ever closed if the debugged target
is a local tab. We should try to close the clients for all cases.
Remote debugging clients are ignored and I think are still left opened.
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63dc9d774f80 Close DebuggerClient's opened by about:debugging toolboxes. r=jdescottes
Comment 3•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•