Skip to content

Commit

Permalink
Fallback to use tab attribute, if check for content window failed
Browse files Browse the repository at this point in the history
(workaround for #208)
  • Loading branch information
Infocatcher committed Jan 30, 2016
1 parent e4442e0 commit 19d1f63
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -4035,7 +4035,14 @@ var privateTab = {
return window && PrivateBrowsingUtils._privateTabOrigIsWindowPrivate(window);
},
isPrivateContent: function(window) {
return this.isPrivateWindow(this.getContentWindow(window));
try {
return this.isPrivateWindow(this.getContentWindow(window));
}
catch(e) {
_log("isPrivateContent() failed. Electrolysis? Fallback to check private attribute");
Components.utils.reportError(e);
}
return window.gBrowser.selectedTab.hasAttribute(this.privateAttr);
},
getContentWindow: function(window) {
// Note: with enabled Electrolysis window.content may refers to
Expand Down

0 comments on commit 19d1f63

Please sign in to comment.