Skip to content

Commit

Permalink
Fallback: check for our private attribute in isPrivateTab()
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Jul 29, 2015
1 parent b780371 commit 90cc535
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3883,14 +3883,15 @@ var privateTab = {
return this.getPrivacyContext(window);
},
isPrivateTab: function(tab) {
var privacyContext = tab && this.getTabPrivacyContext(tab);
var privacyContext = this.getTabPrivacyContext(tab);
if(!privacyContext) {
Components.utils.reportError(
LOG_PREFIX
+ "isPrivateTab(): getTabPrivacyContext() failed. Electrolysis?"
);
return tab.getAttribute(this.privateAttr) == "true";
}
return privacyContext && privacyContext.usePrivateBrowsing;
return privacyContext.usePrivateBrowsing;
},
isPendingTab: function(tab) {
return tab.hasAttribute("pending");
Expand Down

0 comments on commit 90cc535

Please sign in to comment.