From 02eeb17e3b60cec8b406da87121c08f0c66207e0 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Thu, 20 Mar 2014 17:27:42 -0700 Subject: [PATCH] Backed out changeset 74dacf9ea7d4 (bug 985777) for m-bc bustage on a CLOSED TREE --- browser/base/content/browser.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 44b8b356ae4c..4be040b95b4c 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6855,6 +6855,14 @@ let gRemoteTabsUI = { function switchToTabHavingURI(aURI, aOpenNew, aOpenParams) { // This will switch to the tab in aWindow having aURI, if present. function switchIfURIInWindow(aWindow) { + // Only switch to the tab if neither the source and desination window are + // private and they are not in permanent private borwsing mode + if ((PrivateBrowsingUtils.isWindowPrivate(window) || + PrivateBrowsingUtils.isWindowPrivate(aWindow)) && + !PrivateBrowsingUtils.permanentPrivateBrowsing) { + return false; + } + let browsers = aWindow.gBrowser.browsers; for (let i = 0; i < browsers.length; i++) { let browser = browsers[i];