зеркало из https://github.com/mozilla/gecko-dev.git
Bug 479461 - Private browsing, close window, can't restore session; r=gavin a1.9.1=blocking-firefox3.1+
This commit is contained in:
Родитель
36d4d0a3a5
Коммит
f4d523ab1a
|
@ -171,11 +171,17 @@ PrivateBrowsingService.prototype = {
|
||||||
|
|
||||||
let browser = Cc["@mozilla.org/appshell/window-mediator;1"].
|
let browser = Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||||
getService(Ci.nsIWindowMediator).
|
getService(Ci.nsIWindowMediator).
|
||||||
getMostRecentWindow("navigator:browser").gBrowser;
|
getMostRecentWindow("navigator:browser");
|
||||||
// this ensures a clean slate from which to transition into or out of
|
|
||||||
// private browsing
|
// if all browser windows are closed (i.e. on Mac) we won't have a window here
|
||||||
browser.addTab();
|
// this is only needed on Mac, but it's just good hygiene
|
||||||
browser.removeTab(browser.tabContainer.firstChild);
|
if (browser) {
|
||||||
|
// this ensures a clean slate from which to transition into or out of
|
||||||
|
// private browsing
|
||||||
|
browser = browser.gBrowser;
|
||||||
|
browser.addTab();
|
||||||
|
browser.removeTab(browser.tabContainer.firstChild);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче