mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1383299 - Fix xpcshell test failures, r=dao
Some xpcshell tests run with _windowless_ browser and calls its LoadURI(). It then failed to get `aBrowser.contentWindow` when we tried to create OA and detected if the browser was in the private mode. MozReview-Commit-ID: DWGMyfao1wG --HG-- extra : rebase_source : c8ed703221aa84ead8288dc7c1f200838808792b
This commit is contained in:
parent
c6c14335a6
commit
2292f819c5
@ -35,11 +35,12 @@ this.PrivateBrowsingUtils = {
|
||||
|
||||
isBrowserPrivate(aBrowser) {
|
||||
let chromeWin = aBrowser.ownerGlobal;
|
||||
if (chromeWin.gMultiProcessBrowser || !aBrowser.isConnected) {
|
||||
if (chromeWin.gMultiProcessBrowser || !aBrowser.contentWindow) {
|
||||
// In e10s we have to look at the chrome window's private
|
||||
// browsing status since the only alternative is to check the
|
||||
// content window, which is in another process. If the browser
|
||||
// is lazy then the content window doesn't exist.
|
||||
// is lazy or is running in windowless configuration then the
|
||||
// content window doesn't exist.
|
||||
return this.isWindowPrivate(chromeWin);
|
||||
}
|
||||
return this.privacyContextFromWindow(aBrowser.contentWindow).usePrivateBrowsing;
|
||||
|
Loading…
Reference in New Issue
Block a user