[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-102.8.0esr-12.0-1] Bug 41542: Disable the creation of a default profile

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Thu Feb 16 07:35:43 UTC 2023



Pier Angelo Vendrame pushed to branch tor-browser-102.8.0esr-12.0-1 at The Tor Project / Applications / Tor Browser


Commits:
80a1167e by Pier Angelo Vendrame at 2023-02-16T08:35:36+01:00
Bug 41542: Disable the creation of a default profile

Firefox creates a profile as a fallback for old versions.
However, we do not need this, so we want to prevent Firefox from
creating the related directories.

We comment out the code, but should Mozilla be interested in a
compile-time flag, we could rewrite the patch to add one.

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1770174.

- - - - -


1 changed file:

- toolkit/profile/nsToolkitProfileService.cpp


Changes:

=====================================
toolkit/profile/nsToolkitProfileService.cpp
=====================================
@@ -1587,6 +1587,12 @@ nsresult nsToolkitProfileService::SelectStartupProfile(
 
     rv = CreateDefaultProfile(getter_AddRefs(mCurrent));
     if (NS_SUCCEEDED(rv)) {
+      // tor-browser#41542: We do not need to support legacy versions.
+      // For now, we just use an ifdef, but we could write a patch to disable
+      // this behavior through a build-time flag, should Mozilla be interested
+      // in taking it.
+      // See also https://bugzilla.mozilla.org/show_bug.cgi?id=1770174
+#ifndef BASE_BROWSER
       // If there is only one profile and it isn't meant to be the profile that
       // older versions of Firefox use then we must create a default profile
       // for older versions of Firefox to avoid the existing profile being
@@ -1598,6 +1604,7 @@ nsresult nsToolkitProfileService::SelectStartupProfile(
                       getter_AddRefs(newProfile));
         SetNormalDefault(newProfile);
       }
+#endif
 
       rv = Flush();
       NS_ENSURE_SUCCESS(rv, rv);



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/80a1167e157f946555643dacd858d4866dc365f6

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/80a1167e157f946555643dacd858d4866dc365f6
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/20230216/cfd99035/attachment-0001.htm>


More information about the tbb-commits mailing list