Bug 1408179 Fix manifestCacheKey for langpacks r=gandalf
authorAndrew Swan <aswan@mozilla.com>
Thu, 12 Oct 2017 15:27:40 -0700
changeset 385959 adb9c07370c6d6c7cebb1cfb2baf4cbb9c0e6b8e
parent 385958 95555b11aaafb46646e8c8b2f8b53ee8532f5e77
child 385960 1b5e78113f06a05ffa7a3345e59cac35cd0835cc
push id32672
push userarchaeopteryx@coole-files.de
push dateFri, 13 Oct 2017 09:00:05 +0000
treeherdermozilla-central@3efcb26e5f37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgandalf
bugs1408179
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1408179 Fix manifestCacheKey for langpacks r=gandalf MozReview-Commit-ID: Et0EyyTAi8x
toolkit/components/extensions/Extension.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -1627,16 +1627,17 @@ this.Extension = class extends Extension
     return this._optionalOrigins;
   }
 };
 
 this.Langpack = class extends ExtensionData {
   constructor(addonData, startupReason) {
     super(addonData.resourceURI);
     this.startupData = addonData.startupData;
+    this.manifestCacheKey = [addonData.id, addonData.version];
   }
 
   static getBootstrapScope(id, file) {
     return new LangpackBootstrapScope();
   }
 
   async promiseLocales(locale) {
     let locales = await StartupCache.locales
@@ -1648,20 +1649,16 @@ this.Langpack = class extends ExtensionD
   readLocaleFile(locale) {
     return StartupCache.locales.get([this.id, this.version, locale],
                                     () => super.readLocaleFile(locale))
       .then(result => {
         this.localeData.messages.set(locale, result);
       });
   }
 
-  get manifestCacheKey() {
-    return [this.id, this.version, Services.locale.getAppLocaleAsLangTag()];
-  }
-
   async _parseManifest() {
     let data = await super.parseManifest();
 
     const productCodeName = AppConstants.MOZ_BUILD_APP.replace("/", "-");
 
     // The result path looks like this:
     //   Firefox - `langpack-pl-browser`
     //   Fennec - `langpack-pl-mobile-android`