Commit 9506e131 authored by henry's avatar henry
Browse files

fixup! Bug 7494: Create local home page for TBB.

Bug 42629: Add "about:tor" to `newTabUrls` instead of checking the
scheme and path individually.
parent 08387a7a
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1409,14 +1409,6 @@ var BookmarkingUI = {
    if (!uri) {
      return false;
    }
    // If uri is "about:tor" then we return true. See tor-browser#41717.
    // NOTE: "about:newtab", "about:welcome", "about:home" and
    // "about:privatebrowsing" can also redirect to "about:tor".
    // NOTE: We do not simply add "about:tor" to newTabURLs below because this
    // would also match "about:torconnect".
    if (uri.scheme === "about" && uri.filePath === "tor") {
      return true;
    }
    // Prevent loading AboutNewTab.sys.mjs during startup path if it
    // is only the newTabURL getter we are interested in.
    let newTabURL = Cu.isESModuleLoaded(
@@ -1435,6 +1427,10 @@ var BookmarkingUI = {
      newTabURL,
      "about:home",
      "chrome://browser/content/blanktab.html",
      // Add the "about:tor" uri. See tor-browser#41717.
      // NOTE: "about:newtab", "about:welcome", "about:home" and
      // "about:privatebrowsing" can also redirect to "about:tor".
      "about:tor",
    ];
    if (PrivateBrowsingUtils.isWindowPrivate(window)) {
      newTabURLs.push("about:privatebrowsing");