зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1352183 - Preserve lazy browsers' lazy state when closing the window. r=dao
This commit is contained in:
Родитель
d4679cd05d
Коммит
7b230dd9fb
|
@ -2078,6 +2078,13 @@
|
|||
let getter;
|
||||
let setter;
|
||||
switch (name) {
|
||||
case "permitUnload":
|
||||
getter = () => {
|
||||
return function() {
|
||||
return { permitUnload: true, timedOut: false };
|
||||
};
|
||||
};
|
||||
break;
|
||||
default:
|
||||
getter = () => {
|
||||
this._insertBrowser(aTab);
|
||||
|
@ -5288,15 +5295,20 @@
|
|||
browser.getAttribute("usercontextid") || 0);
|
||||
delete browser.registeredOpenURI;
|
||||
}
|
||||
|
||||
let filter = this._tabFilters.get(tab);
|
||||
let listener = this._tabListeners.get(tab);
|
||||
if (filter) {
|
||||
browser.webProgress.removeProgressListener(filter);
|
||||
|
||||
browser.webProgress.removeProgressListener(filter);
|
||||
filter.removeProgressListener(listener);
|
||||
listener.destroy();
|
||||
let listener = this._tabListeners.get(tab);
|
||||
if (listener) {
|
||||
filter.removeProgressListener(listener);
|
||||
listener.destroy();
|
||||
}
|
||||
|
||||
this._tabFilters.delete(tab);
|
||||
this._tabListeners.delete(tab);
|
||||
this._tabFilters.delete(tab);
|
||||
this._tabListeners.delete(tab);
|
||||
}
|
||||
}
|
||||
const nsIEventListenerService =
|
||||
Components.interfaces.nsIEventListenerService;
|
||||
|
|
|
@ -84,6 +84,11 @@ var TabStateFlusherInternal = {
|
|||
* all the latest data.
|
||||
*/
|
||||
flush(browser) {
|
||||
let tabbrowser = browser.ownerGlobal.gBrowser;
|
||||
if (!tabbrowser.getTabForBrowser(browser).linkedPanel) {
|
||||
return;
|
||||
}
|
||||
|
||||
let id = ++this._lastRequestID;
|
||||
let mm = browser.messageManager;
|
||||
mm.sendAsyncMessage("SessionStore:flush", {id});
|
||||
|
|
Загрузка…
Ссылка в новой задаче