Bug 935402 - Part 1: Cache EF_PBR field. r=yoshi
authorGeorgia Wang <gwang@mozilla.com>
Mon, 18 Nov 2013 15:04:22 +0800
changeset 172936 89efaaa671a1f36a3f8f5690a5e09e60a2561973
parent 172935 691b5f265c9a1cc3f398686173fca43295ee1386
child 172937 ec7986792a8af4ff90c8db9b0d2cd065e9e695df
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyoshi
bugs935402
milestone28.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 935402 - Part 1: Cache EF_PBR field. r=yoshi
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -11550,21 +11550,27 @@ let ICCRecordHelper = {
         }
         pbrs.push(pbr);
       }
 
       if (options.p1 < options.totalRecords) {
         ICCIOHelper.loadNextRecord(options);
       } else {
         if (onsuccess) {
+          RIL.iccInfoPrivate.pbrs = pbrs;
           onsuccess(pbrs);
         }
       }
     }
 
+    if (RIL.iccInfoPrivate.pbrs) {
+      onsuccess(RIL.iccInfoPrivate.pbrs);
+      return;
+    }
+
     let pbrs = [];
     ICCIOHelper.loadLinearFixedEF({fileId : ICC_EF_PBR,
                                    callback: callback.bind(this),
                                    onerror: onerror});
   },
 
   /**
    * Cache EF_IAP record size.