ma1 pushed to branch mullvad-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Mullvad Browser
Commits: 56b44ebf by hackademix at 2023-10-05T19:06:10+02:00 fixup! Bug 40926: Implemented the New Identity feature
Bug 41765: Force about:privatebrowsing in new identity window.
- - - - -
2 changed files:
- browser/base/content/browser.js - browser/components/newidentity/content/newidentity.js
Changes:
===================================== browser/base/content/browser.js ===================================== @@ -4523,7 +4523,7 @@ function OpenBrowserWindow(options) { var extraFeatures = ""; if (options && options.private && PrivateBrowsingUtils.enabled) { extraFeatures = ",private"; - if (!PrivateBrowsingUtils.permanentPrivateBrowsing) { + if (!PrivateBrowsingUtils.permanentPrivateBrowsing || options.private === "no-home") { // Force the new window to load about:privatebrowsing instead of the default home page defaultArgs = "about:privatebrowsing"; }
===================================== browser/components/newidentity/content/newidentity.js ===================================== @@ -433,11 +433,8 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => { openNewWindow() { logger.info("Opening a new window"); return new Promise(resolve => { - // Open a new window with the default homepage - // We could pass {private: true} but we do not because we enforce - // browser.privatebrowsing.autostart = true. - // What about users that change settings? - const win = OpenBrowserWindow(); + // Open a new window forcing the about:privatebrowsing page (tor-browser#41765) + const win = OpenBrowserWindow({private: "no-home"}); // This mechanism to know when the new window is ready is used by // OpenBrowserWindow itself (see its definition in browser.js). win.addEventListener("MozAfterPaint", () => resolve(), { once: true });
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/56b4...
tor-commits@lists.torproject.org