From c99fb9c887015ad03f006f54b4447824b28cd657 Mon Sep 17 00:00:00 2001 From: Kyle Machulis Date: Tue, 26 Jan 2016 13:46:22 -0800 Subject: [PATCH] Bug 1241983 - Make DOM Identity observe inner-window-destroyed not dom-window-destroyed; r=ferjm --- dom/identity/nsDOMIdentity.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/identity/nsDOMIdentity.js b/dom/identity/nsDOMIdentity.js index 47be6c40f50..e2a15d46fcc 100644 --- a/dom/identity/nsDOMIdentity.js +++ b/dom/identity/nsDOMIdentity.js @@ -650,14 +650,14 @@ nsDOMIdentity.prototype = { */ // nsIObserver observe: function nsDOMIdentityInternal_observe(aSubject, aTopic, aData) { - let window = aSubject.QueryInterface(Ci.nsIDOMWindow); - if (window != this._window) { + let wId = aSubject.QueryInterface(Ci.nsISupportsPRUint64).data; + if (wId != this._innerWindowID) { return; } this.uninit(); - Services.obs.removeObserver(this, "dom-window-destroyed"); + Services.obs.removeObserver(this, "inner-window-destroyed"); this._initializeState(); // TODO: Also send message to DOMIdentity notifiying window is no longer valid @@ -729,7 +729,7 @@ nsDOMIdentity.prototype = { }, this); // Setup observers so we can remove message listeners. - Services.obs.addObserver(this, "dom-window-destroyed", false); + Services.obs.addObserver(this, "inner-window-destroyed", false); }, uninit: function DOMIdentity_uninit() {