Bug 545228 - Firefox leaks the world on Windows 7. r=robarnold
This commit is contained in:
Родитель
9c68d73cd3
Коммит
54c399b99f
|
@ -180,6 +180,12 @@ PreviewController.prototype = {
|
|||
this.linkedBrowser.removeEventListener("pageshow", this, false);
|
||||
this.linkedBrowser.removeEventListener("DOMTitleChanged", this, false);
|
||||
this.linkedBrowser.removeEventListener("MozAfterPaint", this, false);
|
||||
|
||||
// Break cycles, otherwise we end up leaking the window with everything
|
||||
// attached to it.
|
||||
delete this.win;
|
||||
delete this.preview;
|
||||
delete this.dirtyRegion;
|
||||
},
|
||||
get wrappedJSObject() {
|
||||
return this;
|
||||
|
@ -383,7 +389,6 @@ function TabWindow(win) {
|
|||
this.tabbrowser.tabContainer.addEventListener(this.events[i], this, false);
|
||||
this.tabbrowser.addTabsProgressListener(this);
|
||||
|
||||
|
||||
AeroPeek.windows.push(this);
|
||||
let tabs = this.tabbrowser.tabs;
|
||||
for (let i = 0; i < tabs.length; i++)
|
||||
|
@ -402,6 +407,8 @@ TabWindow.prototype = {
|
|||
|
||||
let tabs = this.tabbrowser.tabs;
|
||||
|
||||
this.tabbrowser.removeTabsProgressListener(this);
|
||||
|
||||
for (let i = 0; i < this.events.length; i++)
|
||||
this.tabbrowser.tabContainer.removeEventListener(this.events[i], this, false);
|
||||
|
||||
|
@ -589,6 +596,17 @@ var AeroPeek = {
|
|||
this.enabled = this._prefenabled = this.prefs.getBoolPref(TOGGLE_PREF_NAME);
|
||||
},
|
||||
|
||||
destroy: function destroy() {
|
||||
this._enabled = false;
|
||||
|
||||
this.prefs.removeObserver(TOGGLE_PREF_NAME, this);
|
||||
this.prefs.removeObserver(DISABLE_THRESHOLD_PREF_NAME, this);
|
||||
this.prefs.removeObserver(CACHE_EXPIRATION_TIME_PREF_NAME, this);
|
||||
|
||||
if (this.cacheTimer)
|
||||
this.cacheTimer.cancel();
|
||||
},
|
||||
|
||||
get enabled() {
|
||||
return this._enabled;
|
||||
},
|
||||
|
@ -636,7 +654,10 @@ var AeroPeek = {
|
|||
return;
|
||||
|
||||
win.gTaskbarTabGroup.destroy();
|
||||
win.gTaskbarTabGroup = null;
|
||||
delete win.gTaskbarTabGroup;
|
||||
|
||||
if (this.windows.length == 0)
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
resetCacheTimer: function () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче