Bug 843247 - Allow external links to be opened in private windows in perma-private mode. r=ehsan

This commit is contained in:
Josh Matthews 2013-02-26 18:15:57 -05:00
parent 88622bafce
commit 4faff0974a

View File

@ -721,8 +721,9 @@ function handURIToExistingBrowser(uri, location, cmdLine)
if (!shouldLoadURI(uri))
return;
// Do not open external links in private windows
var navWin = RecentWindow.getMostRecentBrowserWindow({private: false});
// Do not open external links in private windows, unless we're in perma-private mode
var allowPrivate = PrivateBrowsingUtils.permanentPrivateBrowsing;
var navWin = RecentWindow.getMostRecentBrowserWindow({private: allowPrivate});
if (!navWin) {
// if we couldn't load it in an existing window, open a new one
openWindow(null, gBrowserContentHandler.chromeURL, "_blank",