Pier Angelo Vendrame pushed to branch base-browser-102.9.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
- 
ff847912
by Pier Angelo Vendrame at 2023-03-10T09:44:43+01:00
- 
9b0c427d
by Pier Angelo Vendrame at 2023-03-10T09:44:51+01:00
- 
ed2e2a46
by Pier Angelo Vendrame at 2023-03-10T09:44:52+01:00
- 
09494c9c
by Pier Angelo Vendrame at 2023-03-10T09:44:52+01:00
- 
3a9ece68
by Pier Angelo Vendrame at 2023-03-10T09:44:53+01:00
- 
8482c229
by Pier Angelo Vendrame at 2023-03-10T09:44:53+01:00
- 
fcc36dda
by Pier Angelo Vendrame at 2023-03-10T09:44:54+01:00
- 
be67ccc4
by Pier Angelo Vendrame at 2023-03-10T09:44:54+01:00
- 
065785a8
by Pier Angelo Vendrame at 2023-03-10T09:44:54+01:00
18 changed files:
- browser/components/about/AboutRedirector.cpp
- browser/config/mozconfigs/base-browser
- browser/config/mozconfigs/base-browser-android
- docshell/base/nsAboutRedirector.cpp
- mobile/android/app/mobile.js
- mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntime.java
- moz.configure
- mozconfig-linux-x86_64-dev
- mozconfig-macos-x86_64 → mozconfig-macos
- netwerk/system/android/nsAndroidNetworkLinkService.cpp
- netwerk/system/linux/nsNetworkLinkService.cpp
- netwerk/system/mac/nsNetworkLinkService.mm
- netwerk/system/netlink/NetlinkService.cpp
- netwerk/system/win32/nsNotifyAddrListener.cpp
- toolkit/modules/AppConstants.jsm
- toolkit/profile/nsToolkitProfileService.cpp
- toolkit/xre/MacRunFromDmgUtils.mm
- toolkit/xre/dllservices/mozglue/WindowsDllBlocklist.cpp
Changes:
| ... | ... | @@ -70,7 +70,7 @@ static const RedirEntry kRedirMap[] = { | 
| 70 | 70 |           nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
 | 
| 71 | 71 |           nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
 | 
| 72 | 72 |           nsIAboutModule::IS_SECURE_CHROME_UI},
 | 
| 73 | -#ifndef BASE_BROWSER
 | |
| 73 | +#ifndef BASE_BROWSER_VERSION
 | |
| 74 | 74 |      {"firefoxview", "chrome://browser/content/firefoxview.html",
 | 
| 75 | 75 |       nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI |
 | 
| 76 | 76 |           nsIAboutModule::HIDE_FROM_ABOUTABOUT},
 | 
| ... | ... | @@ -108,7 +108,7 @@ static const RedirEntry kRedirMap[] = { | 
| 108 | 108 |           nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
 | 
| 109 | 109 |           nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
 | 
| 110 | 110 |           nsIAboutModule::ALLOW_SCRIPT},
 | 
| 111 | -#ifndef BASE_BROWSER
 | |
| 111 | +#ifndef BASE_BROWSER_VERSION
 | |
| 112 | 112 |      {"pocket-saved", "chrome://pocket/content/panels/saved.html",
 | 
| 113 | 113 |       nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
 | 
| 114 | 114 |           nsIAboutModule::URI_CAN_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
 | 
| ... | ... | @@ -36,8 +36,6 @@ ac_add_options --disable-system-policies | 
| 36 | 36 |  # See bug #41131
 | 
| 37 | 37 |  ac_add_options --disable-backgroundtasks
 | 
| 38 | 38 | |
| 39 | -ac_add_options --enable-base-browser
 | |
| 40 | - | |
| 41 | 39 |  # Disable telemetry
 | 
| 42 | 40 |  ac_add_options MOZ_TELEMETRY_REPORTING=
 | 
| 43 | 41 | 
| ... | ... | @@ -31,8 +31,6 @@ ac_add_options --disable-parental-controls | 
| 31 | 31 |  ac_add_options --enable-proxy-bypass-protection
 | 
| 32 | 32 |  ac_add_options --disable-system-policies
 | 
| 33 | 33 | |
| 34 | -ac_add_options --enable-base-browser
 | |
| 35 | - | |
| 36 | 34 |  # Disable telemetry
 | 
| 37 | 35 |  ac_add_options MOZ_TELEMETRY_REPORTING=
 | 
| 38 | 36 | 
| ... | ... | @@ -165,7 +165,7 @@ static const RedirEntry kRedirMap[] = { | 
| 165 | 165 |  #endif
 | 
| 166 | 166 |      {"telemetry", "chrome://global/content/aboutTelemetry.xhtml",
 | 
| 167 | 167 |       nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI},
 | 
| 168 | -#ifndef BASE_BROWSER
 | |
| 168 | +#ifndef BASE_BROWSER_VERSION
 | |
| 169 | 169 |      {"url-classifier", "chrome://global/content/aboutUrlClassifier.xhtml",
 | 
| 170 | 170 |       nsIAboutModule::ALLOW_SCRIPT},
 | 
| 171 | 171 |  #endif
 | 
| ... | ... | @@ -355,7 +355,7 @@ pref("app.update.timerMinimumDelay", 30); // seconds | 
| 355 | 355 |  // used by update service to decide whether or not to
 | 
| 356 | 356 |  // automatically download an update
 | 
| 357 | 357 |  pref("app.update.autodownload", "wifi");
 | 
| 358 | -#ifdef TOR_BROWSER_VERSION
 | |
| 358 | +#ifdef BASE_BROWSER_VERSION
 | |
| 359 | 359 |  pref("app.update.url.android", "");
 | 
| 360 | 360 |  #else
 | 
| 361 | 361 |  pref("app.update.url.android", "https://aus5.mozilla.org/update/4/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/%MOZ_VERSION%/update.xml");
 | 
| ... | ... | @@ -161,9 +161,12 @@ public final class GeckoRuntime implements Parcelable { | 
| 161 | 161 |        mPaused = false;
 | 
| 162 | 162 |        // Monitor network status and send change notifications to Gecko
 | 
| 163 | 163 |        // while active.
 | 
| 164 | -      if (BuildConfig.TOR_BROWSER_VERSION == "") {
 | |
| 164 | +      if (!BuildConfig.TOR_BROWSER) {
 | |
| 165 | 165 |          GeckoNetworkManager.getInstance().start(GeckoAppShell.getApplicationContext());
 | 
| 166 | +      } else {
 | |
| 167 | +        Log.d(LOGTAG, "Tor Browser: skip GeckoNetworkManager startup"); 
 | |
| 166 | 168 |        }
 | 
| 169 | + | |
| 167 | 170 |      }
 | 
| 168 | 171 | |
| 169 | 172 |      @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
 | 
| ... | ... | @@ -171,7 +174,7 @@ public final class GeckoRuntime implements Parcelable { | 
| 171 | 174 |        Log.d(LOGTAG, "Lifecycle: onPause");
 | 
| 172 | 175 |        mPaused = true;
 | 
| 173 | 176 |        // Stop monitoring network status while inactive.
 | 
| 174 | -      if (BuildConfig.TOR_BROWSER_VERSION == "") {
 | |
| 177 | +      if (!BuildConfig.TOR_BROWSER) {
 | |
| 175 | 178 |          GeckoNetworkManager.getInstance().stop();
 | 
| 176 | 179 |        }
 | 
| 177 | 180 |        GeckoThread.onPause();
 | 
| ... | ... | @@ -1016,14 +1016,6 @@ def zlib_in_mozglue(system_zlib, js_shared, linker, os): | 
| 1016 | 1016 |  set_config("ZLIB_IN_MOZGLUE", zlib_in_mozglue)
 | 
| 1017 | 1017 |  set_define("ZLIB_IN_MOZGLUE", zlib_in_mozglue)
 | 
| 1018 | 1018 | |
| 1019 | -option(
 | |
| 1020 | -    "--enable-base-browser",
 | |
| 1021 | -    help="Enable Base Browser"
 | |
| 1022 | -)
 | |
| 1023 | - | |
| 1024 | -set_config("BASE_BROWSER", True, when="--enable-base-browser")
 | |
| 1025 | -set_define("BASE_BROWSER", True, when="--enable-base-browser")
 | |
| 1026 | - | |
| 1027 | 1019 | |
| 1028 | 1020 |  option(
 | 
| 1029 | 1021 |      "--with-relative-data-dir",
 | 
| ... | ... | @@ -1044,6 +1036,37 @@ def relative_data_dir(value, target): | 
| 1044 | 1036 |  set_define("RELATIVE_DATA_DIR", relative_data_dir)
 | 
| 1045 | 1037 | |
| 1046 | 1038 | |
| 1039 | +option(
 | |
| 1040 | +    "--with-base-browser-version",
 | |
| 1041 | +    nargs=1,
 | |
| 1042 | +    help="Set the Base Browser version, e.g., 7.0a1"
 | |
| 1043 | +)
 | |
| 1044 | + | |
| 1045 | + | |
| 1046 | +@depends("--with-base-browser-version")
 | |
| 1047 | +def base_browser_version(value):
 | |
| 1048 | +    if not value:
 | |
| 1049 | +        die(
 | |
| 1050 | +            "--with-base-browser-version is required for Base Browser and derived browsers."
 | |
| 1051 | +        )
 | |
| 1052 | +    return value[0]
 | |
| 1053 | + | |
| 1054 | + | |
| 1055 | +@depends("--with-base-browser-version")
 | |
| 1056 | +def base_browser_version_quoted(value):
 | |
| 1057 | +    if not value:
 | |
| 1058 | +        die(
 | |
| 1059 | +            "--with-base-browser-version is required for Base Browser and derived browsers."
 | |
| 1060 | +        )
 | |
| 1061 | +    if '"' in value or "\\" in value:
 | |
| 1062 | +        die("--with-base-browser-version cannot contain \" or \\.")
 | |
| 1063 | +    return '"{}"'.format(value[0])
 | |
| 1064 | + | |
| 1065 | + | |
| 1066 | +set_define("BASE_BROWSER_VERSION", base_browser_version)
 | |
| 1067 | +set_define("BASE_BROWSER_VERSION_QUOTED", base_browser_version_quoted)
 | |
| 1068 | + | |
| 1069 | + | |
| 1047 | 1070 |  # Please do not add configure checks from here on.
 | 
| 1048 | 1071 | |
| 1049 | 1072 |  # Fallthrough to autoconf-based configure
 | 
| ... | ... | @@ -11,3 +11,4 @@ ac_add_options --enable-default-toolkit=cairo-gtk3 | 
| 11 | 11 |  ac_add_options --disable-strip
 | 
| 12 | 12 |  ac_add_options --disable-install-strip
 | 
| 13 | 13 | |
| 14 | +ac_add_options --with-base-browser-version=dev-build | 
| ... | ... | @@ -123,7 +123,7 @@ nsAndroidNetworkLinkService::GetLinkType(uint32_t* aLinkType) { | 
| 123 | 123 | |
| 124 | 124 |  NS_IMETHODIMP
 | 
| 125 | 125 |  nsAndroidNetworkLinkService::GetNetworkID(nsACString& aNetworkID) {
 | 
| 126 | -#ifdef BASE_BROWSER
 | |
| 126 | +#ifdef BASE_BROWSER_VERSION
 | |
| 127 | 127 |    aNetworkID.Truncate();
 | 
| 128 | 128 |  #else
 | 
| 129 | 129 |    if (!mNetlinkSvc) {
 | 
| ... | ... | @@ -50,7 +50,7 @@ nsNetworkLinkService::GetLinkType(uint32_t* aLinkType) { | 
| 50 | 50 | |
| 51 | 51 |  NS_IMETHODIMP
 | 
| 52 | 52 |  nsNetworkLinkService::GetNetworkID(nsACString& aNetworkID) {
 | 
| 53 | -#ifdef BASE_BROWSER
 | |
| 53 | +#ifdef BASE_BROWSER_VERSION
 | |
| 54 | 54 |    aNetworkID.Truncate();
 | 
| 55 | 55 |  #else
 | 
| 56 | 56 |    if (!mNetlinkSvc) {
 | 
| ... | ... | @@ -123,7 +123,7 @@ nsNetworkLinkService::GetLinkType(uint32_t* aLinkType) { | 
| 123 | 123 | |
| 124 | 124 |  NS_IMETHODIMP
 | 
| 125 | 125 |  nsNetworkLinkService::GetNetworkID(nsACString& aNetworkID) {
 | 
| 126 | -#ifdef BASE_BROWSER
 | |
| 126 | +#ifdef BASE_BROWSER_VERSION
 | |
| 127 | 127 |    aNetworkID.Truncate();
 | 
| 128 | 128 |  #else
 | 
| 129 | 129 |    MutexAutoLock lock(mMutex);
 | 
| ... | ... | @@ -1875,7 +1875,7 @@ void NetlinkService::CalculateNetworkID() { | 
| 1875 | 1875 |  }
 | 
| 1876 | 1876 | |
| 1877 | 1877 |  void NetlinkService::GetNetworkID(nsACString& aNetworkID) {
 | 
| 1878 | -#ifdef BASE_BROWSER
 | |
| 1878 | +#ifdef BASE_BROWSER_VERSION
 | |
| 1879 | 1879 |    aNetworkID.Truncate();
 | 
| 1880 | 1880 |  #else
 | 
| 1881 | 1881 |    MutexAutoLock lock(mMutex);
 | 
| ... | ... | @@ -105,7 +105,7 @@ nsNotifyAddrListener::GetLinkType(uint32_t* aLinkType) { | 
| 105 | 105 | |
| 106 | 106 |  NS_IMETHODIMP
 | 
| 107 | 107 |  nsNotifyAddrListener::GetNetworkID(nsACString& aNetworkID) {
 | 
| 108 | -#ifdef BASE_BROWSER
 | |
| 108 | +#ifdef BASE_BROWSER_VERSION
 | |
| 109 | 109 |    aNetworkID.Truncate();
 | 
| 110 | 110 |  #else
 | 
| 111 | 111 |    MutexAutoLock lock(mMutex);
 | 
| ... | ... | @@ -354,6 +354,8 @@ this.AppConstants = Object.freeze({ | 
| 354 | 354 |    MOZ_WIDGET_TOOLKIT: "@MOZ_WIDGET_TOOLKIT@",
 | 
| 355 | 355 |    ANDROID_PACKAGE_NAME: "@ANDROID_PACKAGE_NAME@",
 | 
| 356 | 356 | |
| 357 | +  BASE_BROWSER_VERSION: "@BASE_BROWSER_VERSION@",
 | |
| 358 | + | |
| 357 | 359 |    DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@",
 | 
| 358 | 360 | |
| 359 | 361 |    MOZ_BING_API_CLIENTID: "@MOZ_BING_API_CLIENTID@",
 | 
| ... | ... | @@ -1583,7 +1583,7 @@ nsresult nsToolkitProfileService::SelectStartupProfile( | 
| 1583 | 1583 |        // this behavior through a build-time flag, should Mozilla be interested
 | 
| 1584 | 1584 |        // in taking it.
 | 
| 1585 | 1585 |        // See also https://bugzilla.mozilla.org/show_bug.cgi?id=1770174
 | 
| 1586 | -#ifndef BASE_BROWSER
 | |
| 1586 | +#ifndef BASE_BROWSER_VERSION
 | |
| 1587 | 1587 |        // If there is only one profile and it isn't meant to be the profile that
 | 
| 1588 | 1588 |        // older versions of Firefox use then we must create a default profile
 | 
| 1589 | 1589 |        // for older versions of Firefox to avoid the existing profile being
 | 
| ... | ... | @@ -288,7 +288,7 @@ static void StripQuarantineBit(NSString* aBundlePath) { | 
| 288 | 288 |    LaunchTask(@"/usr/bin/xattr", arguments);
 | 
| 289 | 289 |  }
 | 
| 290 | 290 | |
| 291 | -#if defined(MOZ_UPDATER) && !defined(BASE_BROWSER)
 | |
| 291 | +#if defined(MOZ_UPDATER) && !defined(BASE_BROWSER_VERSION)
 | |
| 292 | 292 |  bool LaunchElevatedDmgInstall(NSString* aBundlePath, NSArray* aArguments) {
 | 
| 293 | 293 |    NSTask* task;
 | 
| 294 | 294 |    if (@available(macOS 10.13, *)) {
 | 
| ... | ... | @@ -332,7 +332,7 @@ static bool InstallFromPath(NSString* aBundlePath, NSString* aDestPath) { | 
| 332 | 332 | |
| 333 | 333 |    bool triedElevatedInstall = false;
 | 
| 334 | 334 | |
| 335 | -#if defined(MOZ_UPDATER) && !defined(BASE_BROWSER)
 | |
| 335 | +#if defined(MOZ_UPDATER) && !defined(BASE_BROWSER_VERSION)
 | |
| 336 | 336 |    // The installation may have been unsuccessful if the user did not have the
 | 
| 337 | 337 |    // rights to write to the Applications directory. Check for this situation and
 | 
| 338 | 338 |    // launch an elevated installation if necessary. Rather than creating a new,
 | 
| ... | ... | @@ -531,7 +531,7 @@ continue_loading: | 
| 531 | 531 |    return ret;
 | 
| 532 | 532 |  }
 | 
| 533 | 533 | |
| 534 | -#if defined(NIGHTLY_BUILD) || defined(BASE_BROWSER)
 | |
| 534 | +#if defined(NIGHTLY_BUILD) || defined(BASE_BROWSER_VERSION)
 | |
| 535 | 535 |  // Map of specific thread proc addresses we should block. In particular,
 | 
| 536 | 536 |  // LoadLibrary* APIs which indicate DLL injection
 | 
| 537 | 537 |  static void* gStartAddressesToBlock[4];
 | 
| ... | ... | @@ -544,7 +544,7 @@ static bool ShouldBlockThread(void* aStartAddress) { | 
| 544 | 544 |      return false;
 | 
| 545 | 545 |    }
 | 
| 546 | 546 | |
| 547 | -#if defined(NIGHTLY_BUILD) || defined(BASE_BROWSER)
 | |
| 547 | +#if defined(NIGHTLY_BUILD) || defined(BASE_BROWSER_VERSION)
 | |
| 548 | 548 |    for (auto p : gStartAddressesToBlock) {
 | 
| 549 | 549 |      if (p == aStartAddress) {
 | 
| 550 | 550 |        return true;
 | 
| ... | ... | @@ -618,7 +618,7 @@ MFBT_API void DllBlocklist_Initialize(uint32_t aInitFlags) { | 
| 618 | 618 |      }
 | 
| 619 | 619 |    }
 | 
| 620 | 620 | |
| 621 | -#if defined(NIGHTLY_BUILD) || defined(BASE_BROWSER)
 | |
| 621 | +#if defined(NIGHTLY_BUILD) || defined(BASE_BROWSER_VERSION)
 | |
| 622 | 622 |    // Populate a list of thread start addresses to block.
 | 
| 623 | 623 |    HMODULE hKernel = GetModuleHandleW(L"kernel32.dll");
 | 
| 624 | 624 |    if (hKernel) {
 |