Bug 991246 - Fix "aIdsApp is undefined" error in OperatorApps.jsm. r=cjc
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Mon, 07 Apr 2014 10:42:56 -0400
changeset 195803 4f568720898413cb1e07a69de3d327ed146310c0
parent 195802 f70d7183aaef76837597747f33300bd86aef2487
child 195804 1ad0bc421a4c1e6f199e072d8db002a75289c461
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjc
bugs991246
milestone31.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 991246 - Fix "aIdsApp is undefined" error in OperatorApps.jsm. r=cjc
dom/apps/src/OperatorApps.jsm
--- a/dom/apps/src/OperatorApps.jsm
+++ b/dom/apps/src/OperatorApps.jsm
@@ -357,21 +357,23 @@ this.OperatorAppsRegistry = {
     function normalizeCode(aCode) {
       let ncode = "" + aCode;
       while (ncode.length < 3) {
         ncode = "0" + ncode;
       }
       return ncode;
     }
 
-    return Task.spawn(function () {
+    return Task.spawn(function*() {
       let key = normalizeCode(aMcc) + "-" + normalizeCode(aMnc);
       let file = Path.join(this.appsDir.path, SINGLE_VARIANT_CONF_FILE);
       let aData = yield AppsUtils.loadJSONAsync(file);
+
       if (!aData || !(key in aData)) {
-        return;
+        return [];
       }
-      throw new Task.Result(aData[key]);
+
+      return aData[key];
     }.bind(this));
   }
 };
 
 OperatorAppsRegistry.init();