Bug 1023796 - Vertical homescreen without icons in applications after an app gets OOMed. r=fabrice, a=2.0+
authorGhislain 'Aus' Lacroix <glacroix@mozilla.com>
Wed, 25 Jun 2014 22:07:14 -0700
changeset 207592 2eae9f045dfed52c1c7fecae42cc70028316ef4b
parent 207591 4259c1f41713b17180f14bf308aad80eddb0340e
child 207593 c963ceaae67759cabebcd88c0ddcce9a55631492
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice, 2
bugs1023796
milestone32.0a2
Bug 1023796 - Vertical homescreen without icons in applications after an app gets OOMed. r=fabrice, a=2.0+
dom/apps/src/Webapps.jsm
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -2690,37 +2690,38 @@ this.DOMApplicationRegistry = {
 
   /**
     * Asynchronously reads a list of manifests
     */
 
   _manifestCache: {},
 
   _readManifests: function(aData) {
+    let manifestCache = this._manifestCache;
     return Task.spawn(function*() {
       for (let elem of aData) {
         let id = elem.id;
 
-        if (!this._manifestCache[id]) {
+        if (!manifestCache[id]) {
           // the manifest file used to be named manifest.json, so fallback on this.
           let baseDir = this.webapps[id].basePath == this.getCoreAppsBasePath()
                           ? "coreAppsDir" : DIRECTORY_NAME;
 
           let dir = FileUtils.getDir(baseDir, ["webapps", id], false, true);
 
           let fileNames = ["manifest.webapp", "update.webapp", "manifest.json"];
           for (let fileName of fileNames) {
-            this._manifestCache[id] = yield AppsUtils.loadJSONAsync(OS.Path.join(dir.path, fileName));
-            if (this._manifestCache[id]) {
+            manifestCache[id] = yield AppsUtils.loadJSONAsync(OS.Path.join(dir.path, fileName));
+            if (manifestCache[id]) {
               break;
             }
           }
         }
 
-        elem.manifest = this._manifestCache[id];
+        elem.manifest = manifestCache[id];
       }
 
       return aData;
     }.bind(this)).then(null, Cu.reportError);
   },
 
   downloadPackage: function(aManifest, aNewApp, aIsUpdate, aOnSuccess) {
     // Here are the steps when installing a package: