mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1241983 - Make DOM Identity observe inner-window-destroyed not dom-window-destroyed; r=ferjm
This commit is contained in:
parent
c3817f9f6b
commit
2548ea3c35
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user