mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1066447 - Make cloudsync test work in e10s (r=ttaubert)
This commit is contained in:
parent
a26eb97e4c
commit
93cba982be
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user