Bug 1066447 - Make cloudsync test work in e10s (r=ttaubert)

This commit is contained in:
Bill McCloskey 2014-09-18 08:56:55 -07:00
parent a26eb97e4c
commit 93cba982be
2 changed files with 7 additions and 2 deletions

View File

@ -148,8 +148,7 @@ this.Tabs = function () {
let update = function (event) {
if (event.originalTarget.linkedBrowser) {
let win = event.originalTarget.linkedBrowser.contentWindow;
if (PrivateBrowsingUtils.isWindowPrivate(win) &&
if (PrivateBrowsingUtils.isBrowserPrivate(event.originalTarget.linkedBrowser) &&
!PrivateBrowsingUtils.permanentPrivateBrowsing) {
return;
}

View File

@ -16,10 +16,16 @@ const Cc = Components.classes;
const Ci = Components.interfaces;
this.PrivateBrowsingUtils = {
// Rather than passing content windows to this function, please use
// isBrowserPrivate since it works with e10s.
isWindowPrivate: function pbu_isWindowPrivate(aWindow) {
return this.privacyContextFromWindow(aWindow).usePrivateBrowsing;
},
isBrowserPrivate: function(aBrowser) {
return this.isWindowPrivate(aBrowser.ownerDocument.defaultView);
},
privacyContextFromWindow: function pbu_privacyContextFromWindow(aWindow) {
return aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)