[tbb-commits] [Git][tpo/applications/tor-browser][base-browser-115.3.1esr-13.0-1] fixup! Bug 40926: Implemented the New Identity feature

ma1 (@ma1) git at gitlab.torproject.org
Thu Oct 5 17:04:55 UTC 2023



ma1 pushed to branch base-browser-115.3.1esr-13.0-1 at The Tor Project / Applications / Tor Browser


Commits:
b5574131 by hackademix at 2023-10-05T19:03: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
=====================================
@@ -4521,7 +4521,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/tor-browser/-/commit/b55741315122b13231ad5de610230859b9c83cf9

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/b55741315122b13231ad5de610230859b9c83cf9
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20231005/06339507/attachment-0001.htm>


More information about the tbb-commits mailing list