Bug 836731 : Fix processICCIOError. r=vicamo
authorYoshi Huang <allstars.chh@mozilla.com>
Thu, 31 Jan 2013 23:10:34 +0800
changeset 120465 6950feef17ea714bdf14c287892e1f442a3b2e71
parent 120464 c3ef3bcc7f0fb43db55df8fbf6a22c6cd6643a50
child 120466 683b08dc1afd73e823f85c6352115d94e8df8168
push id24251
push userryanvm@gmail.com
push dateThu, 31 Jan 2013 20:56:22 +0000
treeherdermozilla-central@683b08dc1afd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs836731
milestone21.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 836731 : Fix processICCIOError. r=vicamo
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -8737,20 +8737,22 @@ let ICCIOHelper = {
    */
   processICCIOError: function processICCIOError(options) {
     let error = options.onerror || debug;
 
     // See GSM11.11, TS 51.011 clause 9.4, and ISO 7816-4 for the error
     // description.
     let errorMsg = "ICC I/O Error code " +
                    RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError] +
-                   "EF id = " + options.fileId.toString(16) +
-                   " command = " + options.command.toString(16) +
-                   "(" + options.sw1.toString(16) +
-                   "/" + options.sw2.toString(16) + ")";
+                   " EF id = " + options.fileId.toString(16) +
+                   " command = " + options.command.toString(16);
+    if (options.sw1 && options.sw2) {
+      errorMsg += "(" + options.sw1.toString(16) +
+                  "/" + options.sw2.toString(16) + ")";
+    }
     error(errorMsg);
   },
 };
 ICCIOHelper[ICC_COMMAND_SEEK] = null;
 ICCIOHelper[ICC_COMMAND_READ_BINARY] = function ICC_COMMAND_READ_BINARY(options) {
   this.processICCIOReadBinary(options);
 };
 ICCIOHelper[ICC_COMMAND_READ_RECORD] = function ICC_COMMAND_READ_RECORD(options) {