commit 63655f7a4c9575c5ab7828f49a9814c3ff157bda Author: Alex Catarineu acat@torproject.org Date: Wed Sep 18 12:19:39 2019 +0200
fixup! Bug 21431: Clean-up system extensions shipped in Firefox 52 --- browser/components/BrowserGlue.jsm | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index a99a29a014ad..d22f9512184d 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -1844,6 +1844,9 @@ BrowserGlue.prototype = { const ID = "screenshots@mozilla.org"; const _checkScreenshotsPref = async () => { let addon = await AddonManager.getAddonByID(ID); + if (!addon) { + return; + } let disabled = Services.prefs.getBoolPref(PREF, false); if (disabled) { await addon.disable({ allowSystemAddons: true }); @@ -1860,6 +1863,9 @@ BrowserGlue.prototype = { const ID = "webcompat-reporter@mozilla.org"; Services.prefs.addObserver(PREF, async () => { let addon = await AddonManager.getAddonByID(ID); + if (!addon) { + return; + } let enabled = Services.prefs.getBoolPref(PREF, false); if (enabled && !addon.isActive) { await addon.enable({ allowSystemAddons: true });