[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-140.0esr-15.0-1] 3 commits: fixup! TB 41668: Tweaks to the Base Browser updater for Tor Browser



Title: GitLab

henry pushed to branch tor-browser-140.0esr-15.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 7ed4b70d
    by Henry Wilkes at 2025-07-16T18:08:29+01:00
    fixup! TB 41668: Tweaks to the Base Browser updater for Tor Browser
    
    TB 42738: Move override logic to the about:tor commit.
    
  • 84a5fe09
    by Henry Wilkes at 2025-07-16T18:08:30+01:00
    fixup! TB 7494: Create local home page for TBB.
    
    TB 42738: Temporarily revert the about:tor changes to
    BrowserContentHandler.sys.mjs.
    
  • 0a4f89ea
    by Henry Wilkes at 2025-07-16T18:08:31+01:00
    fixup! TB 7494: Create local home page for TBB.
    
    TB 43929: Update about:tor override page logic for ESR 140.
    
    Unlike ESR 128, we do not try and move the startPage logic to earlier in
    the method since it would complicate the patch and upstream's logic.
    Instead, we delay out duplicate about:tor logic until the end of the
    method.
    

1 changed file:

Changes:

  • browser/components/BrowserContentHandler.sys.mjs
    ... ... @@ -781,6 +781,7 @@ nsBrowserContentHandler.prototype = {
    781 781
         var overridePage = "";
    
    782 782
         var additionalPage = "";
    
    783 783
         var willRestoreSession = false;
    
    784
    +    let openAboutTor = false;
    
    784 785
         try {
    
    785 786
           // Read the old value of homepage_override.mstone before
    
    786 787
           // needHomepageOverride updates it, so that we can later add it to the
    
    ... ... @@ -980,16 +981,14 @@ nsBrowserContentHandler.prototype = {
    980 981
                   // Tor Browser: Instead of opening the post-update "override page"
    
    981 982
                   // directly, we ensure that about:tor will be opened, which should
    
    982 983
                   // notify the user that their browser was updated.
    
    983
    -              // NOTE: We ignore any overridePage value, which can come from the
    
    984
    -              // openURL attribute within the updates.xml file.
    
    984
    +              // NOTE: We ignore any existing overridePage value, which can come
    
    985
    +              // from the openURL attribute within the updates.xml file.
    
    985 986
                   Services.prefs.setBoolPref(
    
    986 987
                     "torbrowser.post_update.shouldNotify",
    
    987 988
                     true
    
    988 989
                   );
    
    989
    -              // If the user's homepage is about:tor, we will inform them
    
    990
    -              // about the update on that page; otherwise, we arrange to
    
    991
    -              // open about:tor in a secondary tab.
    
    992
    -              overridePage = startPage === "about:tor" ? "" : "about:tor";
    
    990
    +              openAboutTor = true;
    
    991
    +              overridePage = "about:tor";
    
    993 992
                 }
    
    994 993
                 break;
    
    995 994
               }
    
    ... ... @@ -1090,6 +1089,16 @@ nsBrowserContentHandler.prototype = {
    1090 1089
           startPage = "";
    
    1091 1090
         }
    
    1092 1091
     
    
    1092
    +    // If the user's homepage is about:tor, we do not want to open it twice with
    
    1093
    +    // the override.
    
    1094
    +    if (
    
    1095
    +      openAboutTor &&
    
    1096
    +      startPage === "about:tor" &&
    
    1097
    +      overridePage?.split("|").includes("about:tor")
    
    1098
    +    ) {
    
    1099
    +      startPage = "";
    
    1100
    +    }
    
    1101
    +
    
    1093 1102
         // Only show the startPage if we're not restoring an update session and are
    
    1094 1103
         // not set to skip the start page on this profile
    
    1095 1104
         if (overridePage && startPage && !willRestoreSession && !skipStartPage) {
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx