Bug 867142 - Remove browser.__SS_restoreState and use a WeakMap instead; r=yoric
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let tmp = {};
|
||||
Cu.import("resource:///modules/sessionstore/SessionStore.jsm", tmp);
|
||||
let SessionStore = tmp.SessionStore;
|
||||
|
||||
// Some tests here assume that all restored tabs are loaded without waiting for
|
||||
// the user to bring them to the foreground. We ensure this by resetting the
|
||||
// related preference (see the "firefox.js" defaults file for details).
|
||||
@@ -117,8 +121,6 @@ function newWindowWithTabView(shownCallback, loadCallback, width, height) {
|
||||
|
||||
// ----------
|
||||
function afterAllTabsLoaded(callback, win) {
|
||||
const TAB_STATE_NEEDS_RESTORE = 1;
|
||||
|
||||
win = win || window;
|
||||
|
||||
let stillToLoad = 0;
|
||||
@@ -137,8 +139,7 @@ function afterAllTabsLoaded(callback, win) {
|
||||
let browser = tab.linkedBrowser;
|
||||
|
||||
let isRestorable = !(tab.hidden && !restoreHiddenTabs &&
|
||||
browser.__SS_restoreState &&
|
||||
browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE);
|
||||
SessionStore.isTabStateNeedsRestore(browser));
|
||||
|
||||
if (isRestorable && browser.contentDocument.readyState != "complete" ||
|
||||
browser.webProgress.isLoadingDocument) {
|
||||
|
||||
Reference in New Issue
Block a user