diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index 7840df3c3da7..ba36e7661a6e 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -963,16 +963,16 @@ var loadManifestFromWebManifest = Task.async(function*(aUri) { let extension = new ExtensionData(uri); let manifest = yield extension.loadManifest(); - - // If there were any errors loading the extension, bail out now. - if (extension.errors.length) { - throw new Error("Extension is invalid"); - } + let theme = !!manifest.theme; // Read the list of available locales, and pre-load messages for // all locales. let locales = yield extension.initAllLocales(); + // If there were any errors loading the extension, bail out now. + if (extension.errors.length) + throw new Error("Extension is invalid"); + let bss = (manifest.browser_specific_settings && manifest.browser_specific_settings.gecko) || (manifest.applications && manifest.applications.gecko) || {}; if (manifest.browser_specific_settings && manifest.applications) { @@ -987,7 +987,7 @@ var loadManifestFromWebManifest = Task.async(function*(aUri) { let addon = new AddonInternal(); addon.id = bss.id; addon.version = manifest.version; - addon.type = "webextension" + (manifest.theme ? "-theme" : ""); + addon.type = "webextension" + (theme ? "-theme" : ""); addon.unpack = false; addon.strictCompatibility = true; addon.bootstrap = true;