Pier Angelo Vendrame pushed to branch tor-browser-152.0a1-16.0-2 at The Tor Project / Applications / Tor Browser Commits: e62750ca by Henry Wilkes at 2026-06-25T11:46:27+00:00 fixup! TB 42247: Android helpers for the TorProvider TB 45052: Initialise Tor modules on android in the same order as desktop. - - - - - be028307 by Henry Wilkes at 2026-06-25T11:46:27+00:00 fixup! TB 3455: Add DomainIsolator, for isolating circuit by domain. TB 45052: Move the initialisation of TorDomainIsolator into TorAndroidIntegration. - - - - - 2 changed files: - mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs - toolkit/modules/TorAndroidIntegration.sys.mjs Changes: ===================================== mobile/shared/components/geckoview/GeckoViewStartup.sys.mjs ===================================== @@ -18,8 +18,6 @@ ChromeUtils.defineESModuleGetters(lazy, { RFPHelper: "resource://gre/modules/RFPHelper.sys.mjs", TorAndroidIntegration: "moz-src:///toolkit/modules/TorAndroidIntegration.sys.mjs", - TorDomainIsolator: - "moz-src:///toolkit/components/tor-launcher/TorDomainIsolator.sys.mjs", }); const { debug, warn } = GeckoViewUtils.initLogging("Startup"); @@ -330,8 +328,6 @@ export class GeckoViewStartup { this.#migratePreferences(); lazy.TorAndroidIntegration.init(); - lazy.TorDomainIsolator.init(); - Services.obs.addObserver(this, "browser-idle-startup-tasks-finished"); Services.obs.addObserver(this, "handlersvc-store-initialized"); ===================================== toolkit/modules/TorAndroidIntegration.sys.mjs ===================================== @@ -7,6 +7,8 @@ ChromeUtils.defineESModuleGetters(lazy, { EventDispatcher: "resource://gre/modules/Messaging.sys.mjs", TorConnect: "moz-src:///toolkit/modules/TorConnect.sys.mjs", TorConnectTopics: "moz-src:///toolkit/modules/TorConnect.sys.mjs", + TorDomainIsolator: + "moz-src:///toolkit/components/tor-launcher/TorDomainIsolator.sys.mjs", TorSettingsTopics: "moz-src:///toolkit/modules/TorSettings.sys.mjs", TorProviderBuilder: "moz-src:///toolkit/components/tor-launcher/TorProviderBuilder.sys.mjs", @@ -62,7 +64,7 @@ class TorAndroidIntegrationImpl { /** * Register our listeners. * We want this function to block GeckoView initialization, so it should not be - * async. Any async task should be moved to #deferredInit, instead. + * async. */ init() { if (this.#initialized) { @@ -86,26 +88,21 @@ class TorAndroidIntegrationImpl { Services.obs.addObserver(this, lazy.TorSettingsTopics[topic]); } + // Match the initialisation order from desktop's TorStartupService. + lazy.TorSettings.init().catch(error => { + logger.error("Cannot initailize TorSettings", error); + }); + lazy.TorProviderBuilder.init(); + + lazy.TorConnect.init(); + + lazy.TorDomainIsolator.init(); + // On Android immediately call firstWindowLoaded. This should be safe to // call since it will await the initialisation of the TorProvider set up // by TorProviderBuilder.init. lazy.TorProviderBuilder.firstWindowLoaded(); - - this.#deferredInit(); - } - - /** - * Perform our init tasks that should not block the initialization of - * GeckoView. This function will not be awaited, so errors can only be logged. - */ - async #deferredInit() { - try { - await lazy.TorSettings.init(); - await lazy.TorConnect.init(); - } catch (e) { - logger.error("Cannot initialize TorSettings or TorConnect", e); - } } observe(subj, topic) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/52dc11a... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/52dc11a... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
Pier Angelo Vendrame (@pierov)