Pier Angelo Vendrame pushed to branch tor-browser-115.3.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
115d43a5
by Henry Wilkes at 2023-10-04T14:16:14+00:00
2 changed files:
Changes:
| ... | ... | @@ -1419,6 +1419,14 @@ var BookmarkingUI = { |
| 1419 | 1419 | },
|
| 1420 | 1420 | |
| 1421 | 1421 | isOnNewTabPage({ currentURI }) {
|
| 1422 | + // If uri is "about:tor" then we return true. See tor-browser#41717.
|
|
| 1423 | + // NOTE: "about:newtab", "about:welcome", "about:home" and
|
|
| 1424 | + // "about:privatebrowsing" can also redirect to "about:tor".
|
|
| 1425 | + // NOTE: We do not simply add "about:tor" to newTabURLs below because this
|
|
| 1426 | + // would also match "about:torconnect".
|
|
| 1427 | + if (currentURI?.scheme === "about" && currentURI?.filePath === "tor") {
|
|
| 1428 | + return true;
|
|
| 1429 | + }
|
|
| 1422 | 1430 | // Prevent loading AboutNewTab.jsm during startup path if it
|
| 1423 | 1431 | // is only the newTabURL getter we are interested in.
|
| 1424 | 1432 | let newTabURL = Cu.isModuleLoaded("resource:///modules/AboutNewTab.jsm")
|
| ... | ... | @@ -430,6 +430,18 @@ class BaseAboutNewTabService { |
| 430 | 430 | * the newtab page has no effect on the result of this function.
|
| 431 | 431 | */
|
| 432 | 432 | get defaultURL() {
|
| 433 | + // NOTE: We return "about:tor" rather than the "chrome:" path
|
|
| 434 | + // "chrome://browser/content/abouttor/aboutTor.html"
|
|
| 435 | + // The result is that the channel created in NewChannel in
|
|
| 436 | + // browser/components/about/AboutRedirector.cpp will have its
|
|
| 437 | + // resultPrincipalURI set to "about:tor".
|
|
| 438 | + // What this means in practice is that the loaded document's documentURI and
|
|
| 439 | + // currentURI will be "about:tor" rather than "about:newtab", "about:home",
|
|
| 440 | + // "about:welcome" or "about:privatebrowsing".
|
|
| 441 | + // The disadvantage of this is that we often need to add "about:tor" to
|
|
| 442 | + // places where "about:newtab" or other URIs appear.
|
|
| 443 | + // The advantage is that we maintain more control against changes in
|
|
| 444 | + // mozilla-central.
|
|
| 433 | 445 | return "about:tor";
|
| 434 | 446 | }
|
| 435 | 447 |