Bug 1090776 - Bug 1090776 - Prevent DataClaneError. r=hsinyi, a=2.0m+
authorSzu-Yu Chen [:aknow] <szchen@mozilla.com>
Mon, 10 Nov 2014 12:09:57 +0800
changeset 204285 30129c3ac1e9c5fec2774c97d0f614842b50148b
parent 204284 a7331fe82ec9dfb267e29b17bd9c5997cf6d6318
child 204286 18ca6eb02ce4c0b2d40d8c5c16ad324d096b53e5
push id77
push userkli@mozilla.com
push dateMon, 10 Nov 2014 04:10:19 +0000
treeherdermozilla-b2g32_v2_0m@30129c3ac1e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi, 2.0m
bugs1090776
milestone32.0
Bug 1090776 - Bug 1090776 - Prevent DataClaneError. r=hsinyi, a=2.0m+
dom/system/gonk/ril_worker.js
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -6066,16 +6066,22 @@ RilObject.prototype[REQUEST_SET_CALL_FOR
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_QUERY_CALL_WAITING] =
   function REQUEST_QUERY_CALL_WAITING(length, options) {
   options.success = (options.rilRequestError === 0);
   if (!options.success) {
     options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
+
+    if (options.callback) {
+      // Prevent DataCloneError when sending chrome messages.
+      delete options.callback;
+    }
+
     this.sendChromeMessage(options);
     return;
   }
 
   if (options.callback) {
     options.callback.call(this, options);
     return;
   }
@@ -6086,16 +6092,22 @@ RilObject.prototype[REQUEST_QUERY_CALL_W
                      ((Buf.readInt32() & ICC_SERVICE_CLASS_VOICE) == 0x01));
   this.sendChromeMessage(options);
 };
 
 RilObject.prototype[REQUEST_SET_CALL_WAITING] = function REQUEST_SET_CALL_WAITING(length, options) {
   options.success = (options.rilRequestError === 0);
   if (!options.success) {
     options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
+
+    if (options.callback) {
+      // Prevent DataCloneError when sending chrome messages.
+      delete options.callback;
+    }
+
     this.sendChromeMessage(options);
     return;
   }
 
   if (options.callback) {
     options.callback.call(this, options);
     return;
   }