From 89f9d4ec4a73bc23e24a3db2b3a5feeff553e22b Mon Sep 17 00:00:00 2001 From: Infocatcher Date: Sat, 22 Aug 2015 21:22:29 +0300 Subject: [PATCH] Use .contentWindowAsCPOW and .contentDocumentAsCPOW (not needed now, for future versions) (#38) --- Session_Bookmarks/sessionBookmarks.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Session_Bookmarks/sessionBookmarks.js b/Session_Bookmarks/sessionBookmarks.js index 646a2cfa..0681ff0b 100644 --- a/Session_Bookmarks/sessionBookmarks.js +++ b/Session_Bookmarks/sessionBookmarks.js @@ -1211,8 +1211,9 @@ this.bookmarks = { let privateAttr = "privateTab-isPrivate"; let isPrivate = _isPrivate || false; if(_isPrivate === undefined) try { + let contentWindow = browser.contentWindow || browser.contentWindowAsCPOW; isPrivate = "PrivateBrowsingUtils" in window - && PrivateBrowsingUtils.isWindowPrivate(browser.contentWindow) + && PrivateBrowsingUtils.isWindowPrivate(contentWindow) || tab.hasAttribute(privateAttr); } catch(e2) { @@ -1314,7 +1315,7 @@ this.bookmarks = { && tab != gBrowser.selectedTab // Should be loaded automatically in this case && ( tab.getAttribute("pending") == "true" // Gecko >= 9.0 - || browser.contentDocument.readyState == "uninitialized" + || (browser.contentDocument || browser.contentDocumentAsCPOW).readyState == "uninitialized" // || browser.__SS_restoreState == 1 ) ) {