mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1268073 - Free loader created by BrowserToolboxProcess. r=jryans
This commit is contained in:
parent
b62081ba39
commit
250e55dddb
@ -261,6 +261,9 @@ BrowserToolboxProcess.prototype = {
|
||||
|
||||
this._dbgProcess = null;
|
||||
this._options = null;
|
||||
if (this.loader) {
|
||||
this.loader.destroy();
|
||||
}
|
||||
this.loader = null;
|
||||
this._telemetry = null;
|
||||
}
|
||||
|
@ -82,6 +82,15 @@ this.DevToolsLoader = function DevToolsLoader() {
|
||||
};
|
||||
|
||||
DevToolsLoader.prototype = {
|
||||
destroy: function (reason = "shutdown") {
|
||||
Services.obs.removeObserver(this, "devtools-unload");
|
||||
|
||||
if (this._provider) {
|
||||
this._provider.unload(reason);
|
||||
delete this._provider;
|
||||
}
|
||||
},
|
||||
|
||||
get provider() {
|
||||
if (!this._provider) {
|
||||
this._loadProvider();
|
||||
@ -177,12 +186,7 @@ DevToolsLoader.prototype = {
|
||||
if (topic != "devtools-unload") {
|
||||
return;
|
||||
}
|
||||
Services.obs.removeObserver(this, "devtools-unload");
|
||||
|
||||
if (this._provider) {
|
||||
this._provider.unload(data);
|
||||
delete this._provider;
|
||||
}
|
||||
this.destroy(data);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user