commit 62ec69b09ff02649b3eab64a08fa87549c0bfc16 Author: Matthew Finkel Matthew.Finkel@gmail.com Date: Fri Nov 30 07:05:05 2018 +0000
Bug 28640: Do not load Torbutton from the user's profile (only on Android) --- toolkit/mozapps/extensions/internal/XPIProvider.jsm | 11 +++++++++++ toolkit/mozapps/extensions/internal/moz.build | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index a8be063ddbde..f9e48977053e 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -1601,6 +1601,17 @@ var XPIStates = { for (let [id, file] of location.getAddonLocations(true)) { knownIds.delete(id);
+#if defined(TOR_BROWSER_VERSION) && defined(ANDROID) + // Remove Torbutton if it is installed in the user profile + if (id === "torbutton@torproject.org" && + location.name === KEY_APP_PROFILE) { + logger.debug("Uninstalling Torbutton from user profile."); + location.uninstallAddon(id); + changed = true; + continue; + } +#endif + let xpiState = loc.get(id); if (!xpiState) { logger.debug("New add-on ${id} in ${location}", {id, location: location.name}); diff --git a/toolkit/mozapps/extensions/internal/moz.build b/toolkit/mozapps/extensions/internal/moz.build index 8661ef7125dd..32b75a5cef68 100644 --- a/toolkit/mozapps/extensions/internal/moz.build +++ b/toolkit/mozapps/extensions/internal/moz.build @@ -15,10 +15,13 @@ EXTRA_JS_MODULES.addons += [ 'ProductAddonChecker.jsm', 'SpellCheckDictionaryBootstrap.js', 'XPIInstall.jsm', - 'XPIProvider.jsm', 'XPIProviderUtils.js', ]
+EXTRA_PP_JS_MODULES.addons += [ + 'XPIProvider.jsm', +] + TESTING_JS_MODULES += [ 'AddonTestUtils.jsm', ]
tbb-commits@lists.torproject.org