| ... | 
... | 
@@ -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) {
 |