[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-147.0a1-16.0-2] TB 44591: Force extensions initialization on startup.



Title: GitLab

ma1 pushed to branch tor-browser-147.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • 9dc8507f
    by hackademix at 2026-02-04T08:20:12+01:00
    TB 44591: Force extensions initialization on startup.
    

1 changed file:

Changes:

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
    ... ... @@ -31,6 +31,7 @@ import kotlinx.coroutines.GlobalScope
    31 31
     import kotlinx.coroutines.async
    
    32 32
     import kotlinx.coroutines.launch
    
    33 33
     import mozilla.appservices.autofill.AutofillApiException
    
    34
    +import mozilla.components.browser.engine.gecko.GeckoEngine
    
    34 35
     import mozilla.components.browser.state.action.SystemAction
    
    35 36
     import mozilla.components.browser.state.selector.selectedTab
    
    36 37
     import mozilla.components.browser.state.store.BrowserStore
    
    ... ... @@ -702,6 +703,20 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
    702 703
                         components.useCases.tabsUseCases.selectTab(sessionId)
    
    703 704
                     },
    
    704 705
                     onExtensionsLoaded = { extensions ->
    
    706
    +
    
    707
    +                    // temp fix for tb#44591 "fails to initialize WebExtensions"
    
    708
    +                    // disable and enable each extension to properly initialize them
    
    709
    +                    extensions.forEach { extension ->
    
    710
    +                        if (extension.isEnabled()) {
    
    711
    +                          (components.core.engine as GeckoEngine).disableWebExtension(
    
    712
    +                              extension,
    
    713
    +                              onSuccess = {
    
    714
    +                                  (components.core.engine as GeckoEngine).enableWebExtension(extension)
    
    715
    +                              },
    
    716
    +                          )
    
    717
    +                        }
    
    718
    +                    }
    
    719
    +
    
    705 720
                         // Delay until bootstrap is finished so that it will actually update tor-browser#44303
    
    706 721
                         components.torController.registerRunOnceBootstrapped(object : RunOnceBootstrapped {
    
    707 722
                             override fun onBootstrapped() {
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx