Backed out changeset 0a53b2d44e77 (bug 1142758) for apps/verticalhome/test/marionette/grid_layout_test.js failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 19 Mar 2015 16:33:19 -0400
changeset 263395 896482f734c0c994ba9a19820910641e9eb14f77
parent 263394 15f22c60b7983b258234b993666c70dd0acf6d73
child 263396 e09326e800c1aa75a61bf49f6bc219d60133a8ca
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1142758
milestone39.0a1
backs out0a53b2d44e77a44ff2845c10295f701d6f50f38b
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
Backed out changeset 0a53b2d44e77 (bug 1142758) for apps/verticalhome/test/marionette/grid_layout_test.js failures.
dom/apps/AppsUtils.jsm
dom/apps/Langpacks.jsm
dom/apps/Webapps.jsm
--- a/dom/apps/AppsUtils.jsm
+++ b/dom/apps/AppsUtils.jsm
@@ -780,41 +780,36 @@ this.AppsUtils = {
 
     return appsService.getManifestURLByLocalId(appId);
   },
 }
 
 /**
  * Helper object to access manifest information with locale support
  */
-this.ManifestHelper = function(aManifest, aOrigin, aManifestURL, aLang) {
+this.ManifestHelper = function(aManifest, aOrigin, aManifestURL) {
   // If the app is packaged, we resolve uris against the origin.
   // If it's not, against the manifest url.
 
   if (!aOrigin || !aManifestURL) {
     throw Error("ManifestHelper needs both origin and manifestURL");
   }
 
   this._baseURI = Services.io.newURI(
     aOrigin.startsWith("app://") ? aOrigin : aManifestURL, null, null);
 
   // We keep the manifest url in all cases since we need it to
   // resolve the package path for packaged apps.
   this._manifestURL = Services.io.newURI(aManifestURL, null, null);
 
   this._manifest = aManifest;
-
-  let locale = aLang;
-  if (!locale) {
-    let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"]
-                   .getService(Ci.nsIXULChromeRegistry)
-                   .QueryInterface(Ci.nsIToolkitChromeRegistry);
-    locale = chrome.getSelectedLocale("global").toLowerCase();
-  }
-
+  let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"]
+                 .getService(Ci.nsIXULChromeRegistry)
+                 .QueryInterface(Ci.nsIToolkitChromeRegistry);
+  let locale = chrome.getSelectedLocale("global").toLowerCase();
   this._localeRoot = this._manifest;
 
   if (this._manifest.locales && this._manifest.locales[locale]) {
     this._localeRoot = this._manifest.locales[locale];
   }
   else if (this._manifest.locales) {
     // try with the language part of the locale ("en" for en-GB) only
     let lang = locale.split('-')[0];
--- a/dom/apps/Langpacks.jsm
+++ b/dom/apps/Langpacks.jsm
@@ -240,17 +240,17 @@ this.Langpacks = {
           }
         },
         () => { getValueFromManifest(aManifest); }
       );
     }
 
     // We need to get the app with the manifest since the version is only
     // available in the manifest.
-    this._appFromManifestURL(aData.manifestURL, aData.entryPoint, aData.lang)
+    this._appFromManifestURL(aData.manifestURL, aData.entryPoint)
       .then(aApp => {
         let manifest = aApp.manifest;
 
         // No langpack for this app or we have langpack(s) for this app, but
         // not for this language.
         // Fallback to the manifest values.
         if (!this._data[aData.manifestURL] ||
             !this._data[aData.manifestURL].langs[aData.lang]) {
--- a/dom/apps/Webapps.jsm
+++ b/dom/apps/Webapps.jsm
@@ -4669,17 +4669,17 @@ this.DOMApplicationRegistry = {
     });
   },
 
   getAppByManifestURL: function(aManifestURL) {
     return AppsUtils.getAppByManifestURL(this.webapps, aManifestURL);
   },
 
   // Returns a promise that resolves to the app object with the manifest.
-  getFullAppByManifestURL: function(aManifestURL, aEntryPoint, aLang) {
+  getFullAppByManifestURL: function(aManifestURL, aEntryPoint) {
     let app = this.getAppByManifestURL(aManifestURL);
     if (!app) {
       return Promise.reject("NoSuchApp");
     }
 
     return this.getManifestFor(aManifestURL).then((aManifest) => {
       let manifest = aEntryPoint && aManifest.entry_points &&
                      aManifest.entry_points[aEntryPoint]
@@ -4687,18 +4687,17 @@ this.DOMApplicationRegistry = {
         : aManifest;
 
       // `version` doesn't change based on entry points, and we need it
       // to check langpack versions.
       if (manifest !== aManifest) {
         manifest.version = aManifest.version;
       }
 
-      app.manifest =
-        new ManifestHelper(manifest, app.origin, app.manifestURL, aLang);
+      app.manifest = new ManifestHelper(manifest, app.origin, app.manifestURL);
       return app;
     });
   },
 
   _getAppWithManifest: Task.async(function*(aManifestURL) {
     let app = this.getAppByManifestURL(aManifestURL);
     if (!app) {
       throw new Error("NO_SUCH_APP");