зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1241983 - Make DOM Identity observe inner-window-destroyed not dom-window-destroyed; r=ferjm
This commit is contained in:
Родитель
c3817f9f6b
Коммит
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() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче