Skip to content

Commit

Permalink
Use .contentWindowAsCPOW and .contentDocumentAsCPOW
Browse files Browse the repository at this point in the history
(not needed now, for future versions)
(#38)
  • Loading branch information
Infocatcher committed Aug 22, 2015
1 parent c02151c commit 89f9d4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Session_Bookmarks/sessionBookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
)
) {
Expand Down

0 comments on commit 89f9d4e

Please sign in to comment.