mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Bug 839280 - devtools increase CC graph size; r=jwalker
This commit is contained in:
parent
fd4c99b633
commit
752ee1c08e
@ -714,6 +714,11 @@ Toolbox.prototype = {
|
||||
outstanding.push(panel.destroy());
|
||||
}
|
||||
|
||||
let container = this.doc.getElementById("toolbox-buttons");
|
||||
while(container.firstChild) {
|
||||
container.removeChild(container.firstChild);
|
||||
}
|
||||
|
||||
outstanding.push(this._host.destroy());
|
||||
|
||||
// Targets need to be notified that the toolbox is being torn down, so that
|
||||
@ -726,6 +731,9 @@ Toolbox.prototype = {
|
||||
|
||||
Promise.all(outstanding).then(function() {
|
||||
this.emit("destroyed");
|
||||
// Free _host after the call to destroyed in order to let a chance
|
||||
// to destroyed listeners to still query toolbox attributes
|
||||
this._host = null;
|
||||
deferred.resolve();
|
||||
}.bind(this));
|
||||
|
||||
|
@ -607,7 +607,7 @@ let gDevToolsBrowser = {
|
||||
|
||||
// Destroy toolboxes for closed window
|
||||
for (let [target, toolbox] of gDevTools._toolboxes) {
|
||||
if (toolbox.frame.ownerDocument.defaultView == win) {
|
||||
if (toolbox.frame && toolbox.frame.ownerDocument.defaultView == win) {
|
||||
toolbox.destroy();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user