Debugger preview popup leaks 2 pools every time
Categories
(DevTools :: Debugger, task, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
What were you doing?
To understand the bug you need some way of logging the number of pools currently registered in the devtools-client. You can use something like
diff --git a/devtools/shared/client/devtools-client.js b/devtools/shared/client/devtools-client.js
--- a/devtools/shared/client/devtools-client.js
+++ b/devtools/shared/client/devtools-client.js
@@ -765,19 +765,23 @@ DevToolsClient.prototype = {
return this.__pools;
}
this.__pools = new Set();
return this.__pools;
},
addActorPool(pool) {
this._pools.add(pool);
+ console.log("@@@@@ +++ this._pools.size", this._pools.size);
+ // try { throw new Error("e"); } catch(e) { dump(e.stack + "\n"); }
},
removeActorPool(pool) {
this._pools.delete(pool);
+ console.log("@@@@@ --- this._pools.size", this._pools.size);
+ // try { throw new Error("e"); } catch(e) { dump(e.stack + "\n"); }
},
/**
* Return the Front for the Actor whose ID is the one passed in argument.
*
* @param {String} actorID: The actor ID to look for.
*/
getFrontByID(actorID) {
Then the STRs are:
- open devtools
- open debugger
- hit a breakpoint
- hover on variables a few times
What happened?
You will see that the number of pools grows (by at least 2 for each preview popup).
After resuming, the number of pools will not decrease. It will only decrease when closing devtools.
What should have happened?
The pools should be released when the popup is closed.
Anything else we should know?
The stack traces leading to the creation of the preview popup pools are:
Reporter | ||
Comment 1•5 years ago
|
||
The same can be said about the project search feature. Whenever a source front is created by the debugger for a project search, it will be added as a pool because it manages its content which is a long string. This source front is never released until devtools are closed.
Reporter | ||
Comment 2•5 years ago
|
||
And we also have a similar situation for stylesheet fronts used by the style editor, never cleaned on reload.
Reporter | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Updated•2 years ago
|
Description
•