Bug 962447 - [fugu][b2g] should getFailCauseCode() even the connection hasn't been established. r=vicamo
authorHsin-Yi Tsai <htsai@mozilla.com>
Thu, 23 Jan 2014 13:58:30 +0800
changeset 165344 2a4544efc7028344f6cf2e11ed922bd879bc4611
parent 165309 50014b68eca81ca35c4bb7547c6483130294e518
child 165345 fe8135059c9f8d25d67e391a88084eda324a9fd6
push id26088
push userryanvm@gmail.com
push dateMon, 27 Jan 2014 20:10:48 +0000
treeherdermozilla-central@07021aa58289 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs962447
milestone29.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 962447 - [fugu][b2g] should getFailCauseCode() even the connection hasn't been established. r=vicamo
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -3652,18 +3652,18 @@ let RIL = {
   _handleDisconnectedCall: function(disconnectedCall) {
     let message = {rilMessageType: "callDisconnected",
                    call: disconnectedCall};
     this.sendChromeMessage(message);
   },
 
   _sendCallError: function(callIndex, errorMsg) {
     this.sendChromeMessage({rilMessageType: "callError",
-                           callIndex: callIndex,
-                           errorMsg: errorMsg});
+                            callIndex: callIndex,
+                            errorMsg: errorMsg});
   },
 
   _sendDataCallError: function(message, errorCode) {
     // Should not include token for unsolicited response.
     delete message.rilMessageToken;
     message.rilMessageType = "datacallerror";
     if (errorCode == ERROR_GENERIC_FAILURE) {
       message.errorMsg = RIL_ERROR_TO_GECKO_ERROR[errorCode];
@@ -5090,18 +5090,17 @@ RIL[REQUEST_GET_CURRENT_CALLS] = functio
     calls[call.callIndex] = call;
   }
   this._processCalls(calls);
 };
 RIL[REQUEST_DIAL] = function REQUEST_DIAL(length, options) {
   if (options.rilRequestError) {
     // The connection is not established yet.
     options.callIndex = -1;
-    this._sendCallError(options.callIndex,
-                        RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError]);
+    this.getFailCauseCode(options);
   }
 };
 RIL[REQUEST_GET_IMSI] = function REQUEST_GET_IMSI(length, options) {
   if (options.rilRequestError) {
     return;
   }
 
   this.iccInfoPrivate.imsi = Buf.readString();