Merge m-c to inbound. a=merge
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 24 Apr 2015 15:58:56 -0400
changeset 241016 d8db346eeac3e943175dee82e25438149d31def0
parent 240986 95ad98c71c5b11f97639040eb9f7ca1961422266 (current diff)
parent 241015 f214df6ac75f0202e40733be62c5b169d7a40b7f (diff)
child 241017 6d0fb655e2e6d93e3d07f9d255ebf1d7291d3955
push id58988
push userryanvm@gmail.com
push dateFri, 24 Apr 2015 19:58:56 +0000
treeherdermozilla-inbound@d8db346eeac3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone40.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
Merge m-c to inbound. a=merge CLOSED TREE
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="4efd19d199ae52656604f794c5a77518400220fd">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="46e1877c0d88b085f7ebc5f432d5bb8f1e2d1f3b"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="4efd19d199ae52656604f794c5a77518400220fd">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
-        "git_revision": "5d416244c0d9cbbb5823e872ac4b03addeb59bad", 
+        "git_revision": "b4c949cdc780893897c9b45c1adea46e2eb694ff", 
         "remote": "https://git.mozilla.org/releases/gaia.git", 
         "branch": ""
     }, 
-    "revision": "83f70a66bb6c579c56f55592e1dc1fc9957d81e2", 
+    "revision": "70ab08a2dadc6cf89a4d9579c3696517faf807b8", 
     "repo_path": "integration/gaia-central"
 }
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="4efd19d199ae52656604f794c5a77518400220fd">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="5d416244c0d9cbbb5823e872ac4b03addeb59bad"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="b4c949cdc780893897c9b45c1adea46e2eb694ff"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="90f848a40efad820ab00fa52bec52dff37255b12"/>
--- a/dom/bluetooth/BluetoothRilListener.cpp
+++ b/dom/bluetooth/BluetoothRilListener.cpp
@@ -213,19 +213,23 @@ TelephonyListener::HandleCallInfo(nsITel
   aInfo->GetIsConference(&isConference);
 
   hfp->HandleCallStateChanged(callIndex, callState, EmptyString(), number,
                               isOutgoing, isConference, aSend);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyListener::CallStateChanged(nsITelephonyCallInfo* aInfo)
+TelephonyListener::CallStateChanged(uint32_t aLength,
+                                    nsITelephonyCallInfo** aAllInfo)
 {
-  return HandleCallInfo(aInfo, true);
+  for (uint32_t i = 0; i < aLength; ++i) {
+    HandleCallInfo(aAllInfo[i], true);
+  }
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyListener::EnumerateCallState(nsITelephonyCallInfo* aInfo)
 {
   return HandleCallInfo(aInfo, false);
 }
 
--- a/dom/bluetooth/bluetooth2/BluetoothRilListener.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothRilListener.cpp
@@ -212,19 +212,23 @@ TelephonyListener::HandleCallInfo(nsITel
   aInfo->GetIsConference(&isConference);
 
   hfp->HandleCallStateChanged(callIndex, callState, EmptyString(), number,
                               isOutgoing, isConference, aSend);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyListener::CallStateChanged(nsITelephonyCallInfo* aInfo)
+TelephonyListener::CallStateChanged(uint32_t aLength,
+                                    nsITelephonyCallInfo** aAllInfo)
 {
-  return HandleCallInfo(aInfo, true);
+  for (uint32_t i = 0; i < aLength; ++i) {
+    HandleCallInfo(aAllInfo[i], true);
+  }
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyListener::EnumerateCallState(nsITelephonyCallInfo* aInfo)
 {
   return HandleCallInfo(aInfo, false);
 }
 
--- a/dom/cellbroadcast/gonk/CellBroadcastService.js
+++ b/dom/cellbroadcast/gonk/CellBroadcastService.js
@@ -151,26 +151,26 @@ CellBroadcastService.prototype = {
            newSearchList.cdma == oldSearchList.cdma)) {
         return;
       }
 
       gRadioInterfaceLayer
         .getRadioInterface(clientId).sendWorkerMessage("setCellBroadcastSearchList",
                                                        { searchList: newSearchList },
                                                        (function callback(aResponse) {
-        if (DEBUG && !aResponse.success) {
+        if (DEBUG && aResponse.errorMsg) {
           debug("Failed to set new search list: " + newSearchList +
                 " to client id: " + clientId);
         }
 
         responses.push(aResponse);
         if (responses.length == numOfRilClients) {
           let successCount = 0;
           for (let i = 0; i < responses.length; i++) {
-            if (responses[i].success) {
+            if (!responses[i].errorMsg) {
               successCount++;
             }
           }
           if (successCount == numOfRilClients) {
             this._cellBroadcastSearchList = aSettings;
           } else {
             // Rollback the change when failure.
             let lock = gSettingsService.createLock();
--- a/dom/mobilemessage/gonk/SmsService.js
+++ b/dom/mobilemessage/gonk/SmsService.js
@@ -265,23 +265,20 @@ SmsService.prototype = {
     let requestStatusReport = aOptions.requestStatusReport;
 
     gRadioInterfaces[aServiceId].sendWorkerMessage("sendSMS",
                                                    aOptions,
                                                    (aResponse) => {
       // Failed to send SMS out.
       if (aResponse.errorMsg) {
         let error = Ci.nsIMobileMessageCallback.UNKNOWN_ERROR;
-        switch (aResponse.errorMsg) {
-          case RIL.ERROR_RADIO_NOT_AVAILABLE:
-            error = Ci.nsIMobileMessageCallback.NO_SIGNAL_ERROR;
-            break;
-          case RIL.ERROR_FDN_CHECK_FAILURE:
-            error = Ci.nsIMobileMessageCallback.FDN_CHECK_ERROR;
-            break;
+        if (aResponse.errorMsg === RIL.GECKO_ERROR_RADIO_NOT_AVAILABLE) {
+          error = Ci.nsIMobileMessageCallback.NO_SIGNAL_ERROR;
+        } else if (aResponse.errorMsg === RIL.GECKO_ERROR_FDN_CHECK_FAILURE) {
+          error = Ci.nsIMobileMessageCallback.FDN_CHECK_ERROR;
         }
 
         if (aSilent) {
           // There is no way to modify nsIDOMMozSmsMessage attributes as they
           // are read only so we just create a new sms instance to send along
           // with the notification.
           aRequest.notifySendMessageFailed(
             error,
--- a/dom/system/gonk/NetworkManager.js
+++ b/dom/system/gonk/NetworkManager.js
@@ -26,16 +26,20 @@ XPCOMUtils.defineLazyGetter(this, "ppmm"
 XPCOMUtils.defineLazyServiceGetter(this, "gDNSService",
                                    "@mozilla.org/network/dns-service;1",
                                    "nsIDNSService");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gNetworkService",
                                    "@mozilla.org/network/service;1",
                                    "nsINetworkService");
 
+XPCOMUtils.defineLazyServiceGetter(this, "gPACGenerator",
+                                   "@mozilla.org/pac-generator;1",
+                                   "nsIPACGenerator");
+
 const TOPIC_INTERFACE_REGISTERED     = "network-interface-registered";
 const TOPIC_INTERFACE_UNREGISTERED   = "network-interface-unregistered";
 const TOPIC_ACTIVE_CHANGED           = "network-active-changed";
 const TOPIC_PREF_CHANGED             = "nsPref:changed";
 const TOPIC_XPCOM_SHUTDOWN           = "xpcom-shutdown";
 const TOPIC_CONNECTION_STATE_CHANGED = "network-connection-state-changed";
 const PREF_MANAGE_OFFLINE_STATUS     = "network.gonk.manage-offline-status";
 const PREF_NETWORK_DEBUG_ENABLED     = "network.debugging.enabled";
@@ -49,16 +53,19 @@ const IPV6_MAX_PREFIX_LENGTH           =
 // Connection Type for Network Information API
 const CONNECTION_TYPE_CELLULAR  = 0;
 const CONNECTION_TYPE_BLUETOOTH = 1;
 const CONNECTION_TYPE_ETHERNET  = 2;
 const CONNECTION_TYPE_WIFI      = 3;
 const CONNECTION_TYPE_OTHER     = 4;
 const CONNECTION_TYPE_NONE      = 5;
 
+const PROXY_TYPE_MANUAL = Ci.nsIProtocolProxyService.PROXYCONFIG_MANUAL;
+const PROXY_TYPE_PAC    = Ci.nsIProtocolProxyService.PROXYCONFIG_PAC;
+
 let debug;
 function updateDebug() {
   let debugPref = false; // set default value here.
   try {
     debugPref = debugPref || Services.prefs.getBoolPref(PREF_NETWORK_DEBUG_ENABLED);
   } catch (e) {}
 
   if (debugPref) {
@@ -339,17 +346,17 @@ NetworkManager.prototype = {
         // Remove routing table in /proc/net/route
         if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_WIFI) {
           gNetworkService.resetRoutingTable(network);
         } else if (network.type == Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE) {
           gNetworkService.removeDefaultRoute(network);
         }
         // Clear http proxy on active network.
         if (this.active && network.type == this.active.type) {
-          gNetworkService.clearNetworkProxy();
+          this.clearNetworkProxy();
         }
 
         // Abort ongoing captive portal detection on the wifi interface
         CaptivePortalDetectionHelper
           .notify(CaptivePortalDetectionHelper.EVENT_DISCONNECT, network);
         this.setAndConfigureActive();
 
         // Update data connection when Wifi connected/disconnected
@@ -777,24 +784,85 @@ NetworkManager.prototype = {
       case Ci.nsINetworkInterface.NETWORK_TYPE_WIFI:
         return CONNECTION_TYPE_WIFI;
       case Ci.nsINetworkInterface.NETWORK_TYPE_MOBILE:
         return CONNECTION_TYPE_CELLULAR;
     }
   },
 
   _setDefaultRouteAndProxy: function(network, oldInterface) {
-    gNetworkService.setDefaultRoute(network, oldInterface, function(success) {
+    gNetworkService.setDefaultRoute(network, oldInterface, (success) => {
       if (!success) {
         gNetworkService.destroyNetwork(network, function() {});
         return;
       }
-      gNetworkService.setNetworkProxy(network);
+      this.setNetworkProxy(network);
     });
   },
+
+  setNetworkProxy: function(network) {
+    try {
+      if (!network.httpProxyHost || network.httpProxyHost === "") {
+        // Sets direct connection to internet.
+        this.clearNetworkProxy();
+
+        debug("No proxy support for " + network.name + " network interface.");
+        return;
+      }
+
+      debug("Going to set proxy settings for " + network.name + " network interface.");
+
+      // Do not use this proxy server for all protocols.
+      Services.prefs.setBoolPref("network.proxy.share_proxy_settings", false);
+      Services.prefs.setCharPref("network.proxy.http", network.httpProxyHost);
+      Services.prefs.setCharPref("network.proxy.ssl", network.httpProxyHost);
+      let port = network.httpProxyPort === 0 ? 8080 : network.httpProxyPort;
+      Services.prefs.setIntPref("network.proxy.http_port", port);
+      Services.prefs.setIntPref("network.proxy.ssl_port", port);
+
+      let usePAC;
+      try {
+        usePAC = Services.prefs.getBoolPref("network.proxy.pac_generator");
+      } catch (ex) {}
+
+      if (usePAC) {
+        Services.prefs.setCharPref("network.proxy.autoconfig_url",
+                                   gPACGenerator.generate());
+        Services.prefs.setIntPref("network.proxy.type", PROXY_TYPE_PAC);
+      } else {
+        Services.prefs.setIntPref("network.proxy.type", PROXY_TYPE_MANUAL);
+      }
+    } catch(ex) {
+        debug("Exception " + ex + ". Unable to set proxy setting for " +
+              network.name + " network interface.");
+    }
+  },
+
+  clearNetworkProxy: function() {
+    debug("Going to clear all network proxy.");
+
+    Services.prefs.clearUserPref("network.proxy.share_proxy_settings");
+    Services.prefs.clearUserPref("network.proxy.http");
+    Services.prefs.clearUserPref("network.proxy.http_port");
+    Services.prefs.clearUserPref("network.proxy.ssl");
+    Services.prefs.clearUserPref("network.proxy.ssl_port");
+
+    let usePAC;
+    try {
+      usePAC = Services.prefs.getBoolPref("network.proxy.pac_generator");
+    } catch (ex) {}
+
+    if (usePAC) {
+      Services.prefs.setCharPref("network.proxy.autoconfig_url",
+                                 gPACGenerator.generate());
+      Services.prefs.setIntPref("network.proxy.type", PROXY_TYPE_PAC);
+    } else {
+      Services.prefs.clearUserPref("network.proxy.type");
+    }
+  },
 };
 
 let CaptivePortalDetectionHelper = (function() {
 
   const EVENT_CONNECT = "Connect";
   const EVENT_DISCONNECT = "Disconnect";
   let _ongoingInterface = null;
   let _available = ("nsICaptivePortalDetector" in Ci);
--- a/dom/system/gonk/NetworkService.js
+++ b/dom/system/gonk/NetworkService.js
@@ -18,37 +18,30 @@ const NETWORKSERVICE_CID = Components.ID
 const TOPIC_PREF_CHANGED             = "nsPref:changed";
 const TOPIC_XPCOM_SHUTDOWN           = "xpcom-shutdown";
 const PREF_NETWORK_DEBUG_ENABLED     = "network.debugging.enabled";
 
 XPCOMUtils.defineLazyServiceGetter(this, "gNetworkWorker",
                                    "@mozilla.org/network/worker;1",
                                    "nsINetworkWorker");
 
-XPCOMUtils.defineLazyServiceGetter(this, "gPACGenerator",
-                                   "@mozilla.org/pac-generator;1",
-                                   "nsIPACGenerator");
-
 // 1xx - Requested action is proceeding
 const NETD_COMMAND_PROCEEDING   = 100;
 // 2xx - Requested action has been successfully completed
 const NETD_COMMAND_OKAY         = 200;
 // 4xx - The command is accepted but the requested action didn't
 // take place.
 const NETD_COMMAND_FAIL         = 400;
 // 5xx - The command syntax or parameters error
 const NETD_COMMAND_ERROR        = 500;
 // 6xx - Unsolicited broadcasts
 const NETD_COMMAND_UNSOLICITED  = 600;
 
 const WIFI_CTRL_INTERFACE = "wl0.1";
 
-const PROXY_TYPE_MANUAL = Ci.nsIProtocolProxyService.PROXYCONFIG_MANUAL;
-const PROXY_TYPE_PAC = Ci.nsIProtocolProxyService.PROXYCONFIG_PAC;
-
 let debug;
 function updateDebug() {
   let debugPref = false; // set default value here.
   try {
     debugPref = debugPref || Services.prefs.getBoolPref(PREF_NETWORK_DEBUG_ENABLED);
   } catch (e) {}
 
   if (debugPref) {
@@ -513,77 +506,16 @@ NetworkService.prototype = {
       ifname: ifname,
       ip: route.ip,
       prefix: route.prefix,
       gateway: route.gateway
     };
     this.controlMessage(options);
   },
 
-  setNetworkProxy: function(network) {
-    try {
-      if (!network.httpProxyHost || network.httpProxyHost === "") {
-        // Sets direct connection to internet.
-        this.clearNetworkProxy();
-
-        debug("No proxy support for " + network.name + " network interface.");
-        return;
-      }
-
-      debug("Going to set proxy settings for " + network.name + " network interface.");
-
-      // Do not use this proxy server for all protocols.
-      Services.prefs.setBoolPref("network.proxy.share_proxy_settings", false);
-      Services.prefs.setCharPref("network.proxy.http", network.httpProxyHost);
-      Services.prefs.setCharPref("network.proxy.ssl", network.httpProxyHost);
-      let port = network.httpProxyPort === 0 ? 8080 : network.httpProxyPort;
-      Services.prefs.setIntPref("network.proxy.http_port", port);
-      Services.prefs.setIntPref("network.proxy.ssl_port", port);
-
-      let usePAC;
-      try {
-        usePAC = Services.prefs.getBoolPref("network.proxy.pac_generator");
-      } catch (ex) {}
-
-      if (usePAC) {
-        Services.prefs.setCharPref("network.proxy.autoconfig_url",
-                                   gPACGenerator.generate());
-        Services.prefs.setIntPref("network.proxy.type", PROXY_TYPE_PAC);
-      } else {
-        Services.prefs.setIntPref("network.proxy.type", PROXY_TYPE_MANUAL);
-      }
-    } catch(ex) {
-        debug("Exception " + ex + ". Unable to set proxy setting for " +
-                         network.name + " network interface.");
-    }
-  },
-
-  clearNetworkProxy: function() {
-    debug("Going to clear all network proxy.");
-
-    Services.prefs.clearUserPref("network.proxy.share_proxy_settings");
-    Services.prefs.clearUserPref("network.proxy.http");
-    Services.prefs.clearUserPref("network.proxy.http_port");
-    Services.prefs.clearUserPref("network.proxy.ssl");
-    Services.prefs.clearUserPref("network.proxy.ssl_port");
-
-    let usePAC;
-    try {
-      usePAC = Services.prefs.getBoolPref("network.proxy.pac_generator");
-    } catch (ex) {}
-
-    if (usePAC) {
-      Services.prefs.setCharPref("network.proxy.autoconfig_url",
-                                 gPACGenerator.generate());
-      Services.prefs.setIntPref("network.proxy.type", PROXY_TYPE_PAC);
-    } else {
-      Services.prefs.clearUserPref("network.proxy.type");
-    }
-  },
-
   // Enable/Disable DHCP server.
   setDhcpServer: function(enabled, config, callback) {
     if (null === config) {
       config = {};
     }
 
     config.cmd = "setDhcpServer";
     config.enabled = enabled;
--- a/dom/system/gonk/nsINetworkService.idl
+++ b/dom/system/gonk/nsINetworkService.idl
@@ -154,17 +154,17 @@ interface nsIDhcpRequestCallback : nsISu
    */
   void dhcpRequestResult(in boolean success, in jsval dhcpInfo);
 };
 
 
 /**
  * Provide network services.
  */
-[scriptable, uuid(a0f29630-c25c-11e4-8830-0800200c9a66)]
+[scriptable, uuid(2e030f00-8b74-4800-8add-5862ab183503)]
 interface nsINetworkService : nsISupports
 {
   const long MODIFY_ROUTE_ADD    = 0;
   const long MODIFY_ROUTE_REMOVE = 1;
 
   /**
    * Enable or disable Wifi Tethering
    *
@@ -247,30 +247,16 @@ interface nsINetworkService : nsISupport
    * @param callback
    *        Callback to notify Wifi firmware reload result.
    */
   void setWifiOperationMode(in DOMString interfaceName,
                             in DOMString mode,
                             in nsIWifiOperationModeCallback callback);
 
   /**
-   * Set http proxy for specific network
-   *
-   * @param networkInterface
-   *        The network interface which contains the http proxy host/port
-   *        we want to set.
-   */
-  void setNetworkProxy(in nsINetworkInterface networkInterface);
-
-  /**
-   * Clear all http proxy.
-   */
-  void clearNetworkProxy();
-
-  /**
    * Set USB tethering.
    *
    * @param enabled
    *        Boolean to indicate we are going to enable or disable usb tethering.
    * @param config
    *        The usb tethering configuration.
    * @param callback
    *        Callback function used to report the result enabling/disabling usb tethering.
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -1577,26 +1577,25 @@ RilObject.prototype = {
       let prop = this._isCdma ? "cdma" : "gsm";
 
       return aSearchList && aSearchList[prop];
     }.bind(this);
 
     try {
       let str = getSearchListStr(options.searchList);
       this.cellBroadcastConfigs.MMI = this._convertCellBroadcastSearchList(str);
-      options.success = true;
     } catch (e) {
       if (DEBUG) {
         this.context.debug("Invalid Cell Broadcast search list: " + e);
       }
-      options.success = false;
+      options.errorMsg = GECKO_ERROR_UNSPECIFIED_ERROR;
     }
 
     this.sendChromeMessage(options);
-    if (!options.success) {
+    if (options.errorMsg) {
       return;
     }
 
     this._mergeAllCellBroadcastConfigs();
   },
 
   updateCellBroadcastConfig: function() {
     let activate = !this.cellBroadcastDisabled &&
@@ -1848,17 +1847,16 @@ RilObject.prototype = {
   },
 
   sendMMI: function(options) {
     if (DEBUG) {
       this.context.debug("SendMMI " + JSON.stringify(options));
     }
 
     let _sendMMIError = (function(errorMsg) {
-      options.success = false;
       options.errorMsg = errorMsg;
       this.sendChromeMessage(options);
     }).bind(this);
 
     // It's neither a valid mmi code nor an ongoing ussd.
     let mmi = options.mmi;
     if (!mmi && !this._ussdSession) {
       _sendMMIError(MMI_ERROR_KS_ERROR);
@@ -2023,17 +2021,16 @@ RilObject.prototype = {
       // IMEI
       case MMI_SC_IMEI:
         // A device's IMEI can't change, so we only need to request it once.
         if (this.IMEI == null) {
           this.getIMEI(options);
           return;
         }
         // If we already had the device's IMEI, we just send it to chrome.
-        options.success = true;
         options.statusMessage = this.IMEI;
         this.sendChromeMessage(options);
         return;
 
       // CLIP
       case MMI_SC_CLIP:
         options.procedure = mmi.procedure;
         if (options.procedure === MMI_PROCEDURE_INTERROGATION) {
@@ -2158,17 +2155,16 @@ RilObject.prototype = {
   /**
    * Send USSD.
    *
    * @param ussd
    *        String containing the USSD code.
    */
   sendUSSD: function(options, checkSession = true) {
     if (checkSession && !this._ussdSession) {
-      options.success = false;
       options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
       this.sendChromeMessage(options);
       return;
     }
 
     let Buf = this.context.Buf;
     Buf.newParcel(REQUEST_SEND_USSD, options);
     Buf.writeString(options.ussd);
@@ -2884,26 +2880,25 @@ RilObject.prototype = {
     this.sendChromeMessage({rilMessageType: "cardstatechange",
                             cardState: this.cardState});
   },
 
    /**
    * Helper for processing responses of functions such as enterICC* and changeICC*.
    */
   _processEnterAndChangeICCResponses: function(length, options) {
-    options.success = (options.rilRequestError === 0);
     options.retryCount = length ? this.context.Buf.readInt32List()[0] : -1;
     if (options.rilMessageType != "sendMMI") {
       this.sendChromeMessage(options);
       return;
     }
 
     let serviceCode = options.mmi.serviceCode;
 
-    if (options.success) {
+    if (!options.errorMsg) {
       switch (serviceCode) {
         case MMI_SC_PIN:
           options.statusMessage = MMI_SM_KS_PIN_CHANGED;
           break;
         case MMI_SC_PIN2:
           options.statusMessage = MMI_SM_KS_PIN2_CHANGED;
           break;
         case MMI_SC_PUK:
@@ -3946,39 +3941,36 @@ RilObject.prototype = {
    * Helper for processing result of send SMS.
    *
    * @param length
    *        Length of SMS string in the incoming parcel.
    * @param options
    *        Sms information.
    */
   _processSmsSendResult: function(length, options) {
-    if (options.rilRequestError) {
+    if (options.errorMsg) {
       if (DEBUG) {
-        this.context.debug("_processSmsSendResult: rilRequestError = " +
-                           options.rilRequestError);
-      }
-      switch (options.rilRequestError) {
-        case ERROR_SMS_SEND_FAIL_RETRY:
-          if (options.retryCount < SMS_RETRY_MAX) {
-            options.retryCount++;
-            // TODO: bug 736702 TP-MR, retry interval, retry timeout
-            this.sendSMS(options);
-            break;
-          }
-          // Fallback to default error handling if it meets max retry count.
-          // Fall through.
-        default:
-          this.sendChromeMessage({
-            rilMessageType: options.rilMessageType,
-            rilMessageToken: options.rilMessageToken,
-            errorMsg: options.rilRequestError,
-          });
-          break;
-      }
+        this.context.debug("_processSmsSendResult: errorMsg = " +
+                           options.errorMsg);
+      }
+
+      if (options.errorMsg === GECKO_ERROR_SMS_SEND_FAIL_RETRY &&
+          options.retryCount < SMS_RETRY_MAX) {
+        options.retryCount++;
+        // TODO: bug 736702 TP-MR, retry interval, retry timeout
+        this.sendSMS(options);
+        return;
+      }
+
+      // Fallback to default error handling if it meets max retry count.
+      this.sendChromeMessage({
+        rilMessageType: options.rilMessageType,
+        rilMessageToken: options.rilMessageToken,
+        errorMsg: options.errorMsg,
+      });
       return;
     }
 
     let Buf = this.context.Buf;
     options.messageRef = Buf.readInt32();
     options.ackPDU = Buf.readString();
     options.errorCode = Buf.readInt32();
 
@@ -4379,17 +4371,16 @@ RilObject.prototype = {
     });
   },
 
   sendDefaultResponse: function(options) {
     if (!options.rilMessageType) {
       return;
     }
 
-    options.success = (options.rilRequestError === 0);
     this.sendChromeMessage(options);
   },
 
   /**
    * Send messages to the main thread.
    */
   sendChromeMessage: function(message) {
     message.rilMessageClientId = this.context.clientId;
@@ -4411,17 +4402,17 @@ RilObject.prototype = {
 
     if (this.telephonyRequestQueue.isValidRequest(request_type)) {
       this.telephonyRequestQueue.pop(request_type);
     }
   }
 };
 
 RilObject.prototype[REQUEST_GET_SIM_STATUS] = function REQUEST_GET_SIM_STATUS(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let iccStatus = {};
   let Buf = this.context.Buf;
   iccStatus.cardState = Buf.readInt32(); // CARD_STATE_*
   iccStatus.universalPINState = Buf.readInt32(); // CARD_PINSTATE_*
   iccStatus.gsmUmtsSubscriptionAppIndex = Buf.readInt32();
@@ -4477,17 +4468,17 @@ RilObject.prototype[REQUEST_CHANGE_SIM_P
   this._processEnterAndChangeICCResponses(length, options);
 };
 RilObject.prototype[REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE] =
   function REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE(length, options) {
   this._processEnterAndChangeICCResponses(length, options);
 };
 RilObject.prototype[REQUEST_GET_CURRENT_CALLS] = function REQUEST_GET_CURRENT_CALLS(length, options) {
   // Retry getCurrentCalls several times when error occurs.
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     if (this._getCurrentCallsRetryCount < GET_CURRENT_CALLS_RETRY_MAX) {
       this._getCurrentCallsRetryCount++;
       this.getCurrentCalls(options);
     } else {
       this.sendDefaultResponse(options);
     }
     return;
   }
@@ -4549,17 +4540,17 @@ RilObject.prototype[REQUEST_GET_CURRENT_
 };
 RilObject.prototype[REQUEST_DIAL] = function REQUEST_DIAL(length, options) {
   this.sendDefaultResponse(options);
 };
 RilObject.prototype[REQUEST_DIAL_EMERGENCY_CALL] = function REQUEST_DIAL_EMERGENCY_CALL(length, options) {
   RilObject.prototype[REQUEST_DIAL].call(this, length, options);
 };
 RilObject.prototype[REQUEST_GET_IMSI] = function REQUEST_GET_IMSI(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   this.iccInfoPrivate.imsi = this.context.Buf.readString();
   if (DEBUG) {
     this.context.debug("IMSI: " + this.iccInfoPrivate.imsi);
   }
 
@@ -4584,34 +4575,34 @@ RilObject.prototype[REQUEST_CONFERENCE] 
 };
 RilObject.prototype[REQUEST_UDUB] = function REQUEST_UDUB(length, options) {
   this.sendDefaultResponse(options);
 };
 RilObject.prototype[REQUEST_LAST_CALL_FAIL_CAUSE] = function REQUEST_LAST_CALL_FAIL_CAUSE(length, options) {
   // Treat it as CALL_FAIL_ERROR_UNSPECIFIED if the request failed.
   let failCause = CALL_FAIL_ERROR_UNSPECIFIED;
 
-  if (options.rilRequestError === 0) {
+  if (!options.errorMsg) {
     let Buf = this.context.Buf;
     let num = length ? Buf.readInt32() : 0;
 
     if (num) {
       let causeNum = Buf.readInt32();
       failCause = RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[causeNum] || failCause;
     }
     if (DEBUG) this.context.debug("Last call fail cause: " + failCause);
   }
 
   options.failCause = failCause;
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SIGNAL_STRENGTH] = function REQUEST_SIGNAL_STRENGTH(length, options) {
   this._receivedNetworkInfo(NETWORK_INFO_SIGNAL);
 
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let Buf = this.context.Buf;
   let signal = {};
 
   signal.gsmSignalStrength = Buf.readInt32();
   signal.gsmBitErrorRate = Buf.readInt32();
@@ -4634,39 +4625,39 @@ RilObject.prototype[REQUEST_SIGNAL_STREN
 
   if (DEBUG) this.context.debug("signal strength: " + JSON.stringify(signal));
 
   this._processSignalStrength(signal);
 };
 RilObject.prototype[REQUEST_VOICE_REGISTRATION_STATE] = function REQUEST_VOICE_REGISTRATION_STATE(length, options) {
   this._receivedNetworkInfo(NETWORK_INFO_VOICE_REGISTRATION_STATE);
 
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let state = this.context.Buf.readStringList();
   if (DEBUG) this.context.debug("voice registration state: " + state);
 
   this._processVoiceRegistrationState(state);
 };
 RilObject.prototype[REQUEST_DATA_REGISTRATION_STATE] = function REQUEST_DATA_REGISTRATION_STATE(length, options) {
   this._receivedNetworkInfo(NETWORK_INFO_DATA_REGISTRATION_STATE);
 
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let state = this.context.Buf.readStringList();
   this._processDataRegistrationState(state);
 };
 RilObject.prototype[REQUEST_OPERATOR] = function REQUEST_OPERATOR(length, options) {
   this._receivedNetworkInfo(NETWORK_INFO_OPERATOR);
 
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let operatorData = this.context.Buf.readStringList();
   if (DEBUG) this.context.debug("Operator: " + operatorData);
   this._processOperator(operatorData);
 };
 RilObject.prototype[REQUEST_RADIO_POWER] = function REQUEST_RADIO_POWER(length, options) {
@@ -4689,18 +4680,17 @@ RilObject.prototype.readSetupDataCall_v5
   options.dnses = dnses ? [dnses] : [];
   options.gateways = gateways ? [gateways] : [];
   options.active = DATACALL_ACTIVE_UNKNOWN;
   options.state = GECKO_NETWORK_STATE_CONNECTING;
   return options;
 };
 
 RilObject.prototype[REQUEST_SETUP_DATA_CALL] = function REQUEST_SETUP_DATA_CALL(length, options) {
-  if (options.rilRequestError) {
-    options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   if (this.v5Legacy) {
     // Populate the `options` object with the data call information. That way
     // we retain the APN and other info about how the data call was set up.
     this.readSetupDataCall_v5(options);
@@ -4716,17 +4706,17 @@ RilObject.prototype[REQUEST_SETUP_DATA_C
   Buf.readInt32();
   // Skip number of data calls.
   Buf.readInt32();
 
   this.readDataCall_v6(options);
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SIM_IO] = function REQUEST_SIM_IO(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     if (options.onerror) {
       options.onerror(options.errorMsg);
     }
     return;
   }
 
   let Buf = this.context.Buf;
   options.sw1 = Buf.readInt32();
@@ -4752,48 +4742,45 @@ RilObject.prototype[REQUEST_SIM_IO] = fu
     return;
   }
   this.context.ICCIOHelper.processICCIO(options);
 };
 RilObject.prototype[REQUEST_SEND_USSD] = function REQUEST_SEND_USSD(length, options) {
   if (DEBUG) {
     this.context.debug("REQUEST_SEND_USSD " + JSON.stringify(options));
   }
-  options.success = (this._ussdSession = options.rilRequestError === 0);
+  this._ussdSession = !options.errorMsg;
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_CANCEL_USSD] = function REQUEST_CANCEL_USSD(length, options) {
   if (DEBUG) {
     this.context.debug("REQUEST_CANCEL_USSD" + JSON.stringify(options));
   }
 
-  options.success = (options.rilRequestError === 0);
-  this._ussdSession = !options.success;
+  this._ussdSession = !!options.errorMsg;
 
   // The cancelUSSD is triggered by ril_worker itself.
   if (this.cachedUSSDRequest) {
     if (DEBUG) this.context.debug("Send out the cached ussd request");
     this.sendUSSD(this.cachedUSSDRequest);
     this.cachedUSSDRequest = null;
     return;
   }
 
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_GET_CLIR] = function REQUEST_GET_CLIR(length, options) {
-  options.success = (options.rilRequestError === 0);
-  if (!options.success) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   let Buf = this.context.Buf;
   let bufLength = Buf.readInt32();
   if (!bufLength || bufLength < 2) {
-    options.success = false;
     options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
     this.sendChromeMessage(options);
     return;
   }
 
   options.n = Buf.readInt32(); // Will be TS 27.007 +CLIR parameter 'n'.
   options.m = Buf.readInt32(); // Will be TS 27.007 +CLIR parameter 'm'.
 
@@ -4805,17 +4792,16 @@ RilObject.prototype[REQUEST_GET_CLIR] = 
         options.statusMessage = MMI_SM_KS_SERVICE_NOT_PROVISIONED;
         break;
       // CLIR provisioned in permanent mode.
       case 1:
         options.statusMessage = MMI_SM_KS_CLIR_PERMANENT;
         break;
       // Unknown (e.g. no network, etc.).
       case 2:
-        options.success = false;
         options.errorMsg = MMI_ERROR_KS_ERROR;
         break;
       // CLIR temporary mode presentation restricted.
       case 3:
         // TS 27.007 +CLIR parameter 'n'.
         switch (options.n) {
           // Default.
           case 0:
@@ -4823,17 +4809,16 @@ RilObject.prototype[REQUEST_GET_CLIR] = 
           case 1:
             options.statusMessage = MMI_SM_KS_CLIR_DEFAULT_ON_NEXT_CALL_ON;
             break;
           // CLIR suppression.
           case 2:
             options.statusMessage = MMI_SM_KS_CLIR_DEFAULT_ON_NEXT_CALL_OFF;
             break;
           default:
-            options.success = false;
             options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
             break;
         }
         break;
       // CLIR temporary mode presentation allowed.
       case 4:
         // TS 27.007 +CLIR parameter 'n'.
         switch (options.n) {
@@ -4843,64 +4828,60 @@ RilObject.prototype[REQUEST_GET_CLIR] = 
           case 2:
             options.statusMessage = MMI_SM_KS_CLIR_DEFAULT_OFF_NEXT_CALL_OFF;
             break;
           // CLIR invocation.
           case 1:
             options.statusMessage = MMI_SM_KS_CLIR_DEFAULT_OFF_NEXT_CALL_ON;
             break;
           default:
-            options.success = false;
             options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
             break;
         }
         break;
       default:
-        options.success = false;
         options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
         break;
     }
   }
 
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SET_CLIR] = function REQUEST_SET_CLIR(length, options) {
   if (options.rilMessageType == null) {
     // The request was made by ril_worker itself automatically. Don't report.
     return;
   }
-  options.success = (options.rilRequestError === 0);
-  if (options.success && options.rilMessageType === "sendMMI") {
+
+  if (!options.errorMsg && options.rilMessageType === "sendMMI") {
     switch (options.procedure) {
       case MMI_PROCEDURE_ACTIVATION:
         options.statusMessage = MMI_SM_KS_SERVICE_ENABLED;
         break;
       case MMI_PROCEDURE_DEACTIVATION:
         options.statusMessage = MMI_SM_KS_SERVICE_DISABLED;
         break;
     }
   }
   this.sendChromeMessage(options);
 };
 
 RilObject.prototype[REQUEST_QUERY_CALL_FORWARD_STATUS] =
   function REQUEST_QUERY_CALL_FORWARD_STATUS(length, options) {
-  options.success = (options.rilRequestError === 0);
-  if (!options.success) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   let Buf = this.context.Buf;
   let rulesLength = 0;
   if (length) {
     rulesLength = Buf.readInt32();
   }
   if (!rulesLength) {
-    options.success = false;
     options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
     this.sendChromeMessage(options);
     return;
   }
   let rules = new Array(rulesLength);
   for (let i = 0; i < rulesLength; i++) {
     let rule = {};
     rule.active       = Buf.readInt32() == 1; // CALL_FORWARD_STATUS_*
@@ -4918,18 +4899,17 @@ RilObject.prototype[REQUEST_QUERY_CALL_F
     // will be exposed in the form of an array of MozCallForwardingOptions
     // instances.
     options.additionalInformation = rules;
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SET_CALL_FORWARD] =
     function REQUEST_SET_CALL_FORWARD(length, options) {
-  options.success = (options.rilRequestError === 0);
-  if (options.success && options.rilMessageType === "sendMMI") {
+  if (!options.errorMsg && options.rilMessageType === "sendMMI") {
     switch (options.action) {
       case CALL_FORWARD_ACTION_ENABLE:
         options.statusMessage = MMI_SM_KS_SERVICE_ENABLED;
         break;
       case CALL_FORWARD_ACTION_DISABLE:
         options.statusMessage = MMI_SM_KS_SERVICE_DISABLED;
         break;
       case CALL_FORWARD_ACTION_REGISTRATION:
@@ -4939,18 +4919,17 @@ RilObject.prototype[REQUEST_SET_CALL_FOR
         options.statusMessage = MMI_SM_KS_SERVICE_ERASED;
         break;
     }
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_QUERY_CALL_WAITING] =
   function REQUEST_QUERY_CALL_WAITING(length, options) {
-  options.success = (options.rilRequestError === 0);
-  if (!options.success) {
+  if (options.errorMsg) {
     if (options.callback) {
       // Prevent DataCloneError when sending chrome messages.
       delete options.callback;
     }
 
     this.sendChromeMessage(options);
     return;
   }
@@ -4963,18 +4942,17 @@ RilObject.prototype[REQUEST_QUERY_CALL_W
   let Buf = this.context.Buf;
   options.length = Buf.readInt32();
   options.enabled = ((Buf.readInt32() == 1) &&
                      ((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) {
+  if (options.errorMsg) {
     if (options.callback) {
       // Prevent DataCloneError when sending chrome messages.
       delete options.callback;
     }
 
     this.sendChromeMessage(options);
     return;
   }
@@ -4990,49 +4968,42 @@ RilObject.prototype[REQUEST_SMS_ACKNOWLE
 RilObject.prototype[REQUEST_GET_IMEI] = function REQUEST_GET_IMEI(length, options) {
   this.IMEI = this.context.Buf.readString();
   let rilMessageType = options.rilMessageType;
   // So far we only send the IMEI back to chrome if it was requested via MMI.
   if (rilMessageType !== "sendMMI") {
     return;
   }
 
-  options.success = (options.rilRequestError === 0);
-  if (options.success && this.IMEI == null) {
+  if (!options.errorMsg && this.IMEI == null) {
     options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
   }
   options.statusMessage = this.IMEI;
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_GET_IMEISV] = function REQUEST_GET_IMEISV(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   this.IMEISV = this.context.Buf.readString();
 };
 RilObject.prototype[REQUEST_ANSWER] = function REQUEST_ANSWER(length, options) {
   this.sendDefaultResponse(options);
 };
 RilObject.prototype[REQUEST_DEACTIVATE_DATA_CALL] = function REQUEST_DEACTIVATE_DATA_CALL(length, options) {
-  if (options.rilRequestError) {
-    options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
-  }
-
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_QUERY_FACILITY_LOCK] = function REQUEST_QUERY_FACILITY_LOCK(length, options) {
-  options.success = (options.rilRequestError === 0);
-  if (!options.success) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   if (!length) {
-    options.success = false;
     options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
     this.sendChromeMessage(options);
     return;
   }
 
   // Buf.readInt32List()[0] for Call Barring is a bit vector of services.
   let services = this.context.Buf.readInt32List()[0];
 
@@ -5058,20 +5029,19 @@ RilObject.prototype[REQUEST_QUERY_FACILI
       }
 
       options.additionalInformation = serviceClass;
     }
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SET_FACILITY_LOCK] = function REQUEST_SET_FACILITY_LOCK(length, options) {
-  options.success = (options.rilRequestError === 0);
   options.retryCount = length ? this.context.Buf.readInt32List()[0] : -1;
 
-  if (options.success && (options.rilMessageType === "sendMMI")) {
+  if (!options.errorMsg && (options.rilMessageType === "sendMMI")) {
     switch (options.procedure) {
       case MMI_PROCEDURE_ACTIVATION:
         options.statusMessage = MMI_SM_KS_SERVICE_ENABLED;
         break;
       case MMI_PROCEDURE_DEACTIVATION:
         options.statusMessage = MMI_SM_KS_SERVICE_DISABLED;
         break;
     }
@@ -5086,17 +5056,17 @@ RilObject.prototype[REQUEST_CHANGE_BARRI
   }
 
   options.statusMessage = MMI_SM_KS_PASSWORD_CHANGED;
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_QUERY_NETWORK_SELECTION_MODE] = function REQUEST_QUERY_NETWORK_SELECTION_MODE(length, options) {
   this._receivedNetworkInfo(NETWORK_INFO_NETWORK_SELECTION_MODE);
 
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let mode = this.context.Buf.readInt32List();
   let selectionMode;
 
   switch (mode[0]) {
     case NETWORK_SELECTION_MODE_AUTOMATIC:
@@ -5108,62 +5078,59 @@ RilObject.prototype[REQUEST_QUERY_NETWOR
     default:
       selectionMode = GECKO_NETWORK_SELECTION_UNKNOWN;
       break;
   }
 
   this._updateNetworkSelectionMode(selectionMode);
 };
 RilObject.prototype[REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = function REQUEST_SET_NETWORK_SELECTION_AUTOMATIC(length, options) {
-  if (!options.rilRequestError) {
+  if (!options.errorMsg) {
     this._updateNetworkSelectionMode(GECKO_NETWORK_SELECTION_AUTOMATIC);
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SET_NETWORK_SELECTION_MANUAL] = function REQUEST_SET_NETWORK_SELECTION_MANUAL(length, options) {
-  if (!options.rilRequestError) {
+  if (!options.errorMsg) {
     this._updateNetworkSelectionMode(GECKO_NETWORK_SELECTION_MANUAL);
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_QUERY_AVAILABLE_NETWORKS] = function REQUEST_QUERY_AVAILABLE_NETWORKS(length, options) {
-  if (!options.rilRequestError) {
+  if (!options.errorMsg) {
     options.networks = this._processNetworks();
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_DTMF_START] = function REQUEST_DTMF_START(length, options) {
-  options.success = (options.rilRequestError === 0);
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_DTMF_STOP] = null;
 RilObject.prototype[REQUEST_BASEBAND_VERSION] = function REQUEST_BASEBAND_VERSION(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   this.basebandVersion = this.context.Buf.readString();
   if (DEBUG) this.context.debug("Baseband version: " + this.basebandVersion);
 };
 RilObject.prototype[REQUEST_SEPARATE_CONNECTION] = function REQUEST_SEPARATE_CONNECTION(length, options) {
   this.sendDefaultResponse(options);
 };
 RilObject.prototype[REQUEST_SET_MUTE] = null;
 RilObject.prototype[REQUEST_GET_MUTE] = null;
 RilObject.prototype[REQUEST_QUERY_CLIP] = function REQUEST_QUERY_CLIP(length, options) {
-  options.success = (options.rilRequestError === 0);
-  if (!options.success) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   let Buf = this.context.Buf;
   let bufLength = Buf.readInt32();
   if (!bufLength) {
-    options.success = false;
     options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
     this.sendChromeMessage(options);
     return;
   }
 
   // options.provisioned informs about the called party receives the calling
   // party's address information:
   // 0 for CLIP not provisioned
@@ -5174,17 +5141,16 @@ RilObject.prototype[REQUEST_QUERY_CLIP] 
     switch (options.provisioned) {
       case 0:
         options.statusMessage = MMI_SM_KS_SERVICE_DISABLED;
         break;
       case 1:
         options.statusMessage = MMI_SM_KS_SERVICE_ENABLED;
         break;
       default:
-        options.success = false;
         options.errorMsg = MMI_ERROR_KS_ERROR;
         break;
     }
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_LAST_DATA_CALL_FAIL_CAUSE] = null;
 
@@ -5240,19 +5206,18 @@ RilObject.prototype.readDataCall_v6 = fu
   options.addresses = addresses ? addresses.split(" ") : [];
   options.dnses = dnses ? dnses.split(" ") : [];
   options.gateways = gateways ? gateways.split(" ") : [];
   this._setDataCallGeckoState(options);
   return options;
 };
 
 RilObject.prototype[REQUEST_DATA_CALL_LIST] = function REQUEST_DATA_CALL_LIST(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     if (options.rilMessageType) {
-      options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
       this.sendChromeMessage(options);
     }
     return;
   }
 
   if (!options.rilMessageType) {
     // This is an unsolicited data call list changed.
     options.rilMessageType = "datacalllistchanged";
@@ -5285,17 +5250,17 @@ RilObject.prototype[REQUEST_DATA_CALL_LI
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_RESET_RADIO] = null;
 RilObject.prototype[REQUEST_OEM_HOOK_RAW] = null;
 RilObject.prototype[REQUEST_OEM_HOOK_STRINGS] = null;
 RilObject.prototype[REQUEST_SCREEN_STATE] = null;
 RilObject.prototype[REQUEST_SET_SUPP_SVC_NOTIFICATION] = null;
 RilObject.prototype[REQUEST_WRITE_SMS_TO_SIM] = function REQUEST_WRITE_SMS_TO_SIM(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     // `The MS shall return a "protocol error, unspecified" error message if
     // the short message cannot be stored in the (U)SIM, and there is other
     // message storage available at the MS` ~ 3GPP TS 23.038 section 4. Here
     // we assume we always have indexed db as another storage.
     this.acknowledgeGsmSms(false, PDU_FCS_PROTOCOL_ERROR);
   } else {
     this.acknowledgeGsmSms(true, PDU_FCS_OK);
   }
@@ -5308,26 +5273,26 @@ RilObject.prototype[REQUEST_STK_SET_PROF
 RilObject.prototype[REQUEST_STK_SEND_ENVELOPE_COMMAND] = null;
 RilObject.prototype[REQUEST_STK_SEND_TERMINAL_RESPONSE] = null;
 RilObject.prototype[REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM] = null;
 RilObject.prototype[REQUEST_EXPLICIT_CALL_TRANSFER] = null;
 RilObject.prototype[REQUEST_SET_PREFERRED_NETWORK_TYPE] = function REQUEST_SET_PREFERRED_NETWORK_TYPE(length, options) {
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_GET_PREFERRED_NETWORK_TYPE] = function REQUEST_GET_PREFERRED_NETWORK_TYPE(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   options.type = this.context.Buf.readInt32List()[0];
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_GET_NEIGHBORING_CELL_IDS] = function REQUEST_GET_NEIGHBORING_CELL_IDS(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   let radioTech = this.voiceRegistrationState.radioTech;
   if (radioTech == undefined || radioTech == NETWORK_CREG_TECH_UNKNOWN) {
     options.errorMsg = "RadioTechUnavailable";
     this.sendChromeMessage(options);
@@ -5380,17 +5345,17 @@ RilObject.prototype[REQUEST_GET_NEIGHBOR
 
     neighboringCellIds.push(cellId);
   }
 
   options.result = neighboringCellIds;
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_GET_CELL_INFO_LIST] = function REQUEST_GET_CELL_INFO_LIST(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   let Buf = this.context.Buf;
   let cellInfoList = [];
   let num = Buf.readInt32();
   for (let i = 0; i < num; i++) {
@@ -5444,28 +5409,28 @@ RilObject.prototype[REQUEST_GET_CELL_INF
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SET_LOCATION_UPDATES] = null;
 RilObject.prototype[REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE] = null;
 RilObject.prototype[REQUEST_CDMA_SET_ROAMING_PREFERENCE] = function REQUEST_CDMA_SET_ROAMING_PREFERENCE(length, options) {
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_CDMA_QUERY_ROAMING_PREFERENCE] = function REQUEST_CDMA_QUERY_ROAMING_PREFERENCE(length, options) {
-  if (!options.rilRequestError) {
+  if (!options.errorMsg) {
     options.mode = this.context.Buf.readInt32List()[0];
   }
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SET_TTY_MODE] = null;
 RilObject.prototype[REQUEST_QUERY_TTY_MODE] = null;
 RilObject.prototype[REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE] = function REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE(length, options) {
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE] = function REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   let enabled = this.context.Buf.readInt32List();
   options.enabled = enabled[0] ? true : false;
   this.sendChromeMessage(options);
 };
@@ -5475,86 +5440,87 @@ RilObject.prototype[REQUEST_CDMA_FLASH] 
 RilObject.prototype[REQUEST_CDMA_BURST_DTMF] = null;
 RilObject.prototype[REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY] = null;
 RilObject.prototype[REQUEST_CDMA_SEND_SMS] = function REQUEST_CDMA_SEND_SMS(length, options) {
   this._processSmsSendResult(length, options);
 };
 RilObject.prototype[REQUEST_CDMA_SMS_ACKNOWLEDGE] = null;
 RilObject.prototype[REQUEST_GSM_GET_BROADCAST_SMS_CONFIG] = null;
 RilObject.prototype[REQUEST_GSM_SET_BROADCAST_SMS_CONFIG] = function REQUEST_GSM_SET_BROADCAST_SMS_CONFIG(length, options) {
-  if (options.rilRequestError == ERROR_SUCCESS) {
-    this.setSmsBroadcastActivation(true);
-  }
+  if (options.errorMsg) {
+    return;
+  }
+  this.setSmsBroadcastActivation(true);
 };
 RilObject.prototype[REQUEST_GSM_SMS_BROADCAST_ACTIVATION] = null;
 RilObject.prototype[REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG] = null;
 RilObject.prototype[REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG] = function REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG(length, options) {
-  if (options.rilRequestError == ERROR_SUCCESS) {
-    this.setSmsBroadcastActivation(true);
-  }
+  if (options.errorMsg) {
+    return;
+  }
+  this.setSmsBroadcastActivation(true);
 };
 RilObject.prototype[REQUEST_CDMA_SMS_BROADCAST_ACTIVATION] = null;
 RilObject.prototype[REQUEST_CDMA_SUBSCRIPTION] = function REQUEST_CDMA_SUBSCRIPTION(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let result = this.context.Buf.readStringList();
 
   this.iccInfo.mdn = result[0];
   // The result[1] is Home SID. (Already be handled in readCDMAHome())
   // The result[2] is Home NID. (Already be handled in readCDMAHome())
   // The result[3] is MIN.
   this.iccInfo.prlVersion = parseInt(result[4], 10);
 
   this.context.ICCUtilsHelper.handleICCInfoChange();
 };
 RilObject.prototype[REQUEST_CDMA_WRITE_SMS_TO_RUIM] = null;
 RilObject.prototype[REQUEST_CDMA_DELETE_SMS_ON_RUIM] = null;
 RilObject.prototype[REQUEST_DEVICE_IDENTITY] = function REQUEST_DEVICE_IDENTITY(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     return;
   }
 
   let result = this.context.Buf.readStringList();
 
   // The result[0] is for IMEI. (Already be handled in REQUEST_GET_IMEI)
   // The result[1] is for IMEISV. (Already be handled in REQUEST_GET_IMEISV)
   // They are both ignored.
   this.ESN = result[2];
   this.MEID = result[3];
 };
 RilObject.prototype[REQUEST_EXIT_EMERGENCY_CALLBACK_MODE] = function REQUEST_EXIT_EMERGENCY_CALLBACK_MODE(length, options) {
   if (options.internal) {
     return;
   }
 
-  options.success = (options.rilRequestError === 0);
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_GET_SMSC_ADDRESS] = function REQUEST_GET_SMSC_ADDRESS(length, options) {
-  this.SMSC = options.rilRequestError ? null : this.context.Buf.readString();
+  this.SMSC = options.errorMsg ? null : this.context.Buf.readString();
 
   if (!options.rilMessageType || options.rilMessageType !== "getSmscAddress") {
     return;
   }
 
   options.smscAddress = this.SMSC;
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SET_SMSC_ADDRESS] = null;
 RilObject.prototype[REQUEST_REPORT_SMS_MEMORY_STATUS] = function REQUEST_REPORT_SMS_MEMORY_STATUS(length, options) {
-  this.pendingToReportSmsMemoryStatus = options.rilRequestError != ERROR_SUCCESS;
+  this.pendingToReportSmsMemoryStatus = !!options.errorMsg;
 };
 RilObject.prototype[REQUEST_REPORT_STK_SERVICE_IS_RUNNING] = null;
 RilObject.prototype[REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE] = null;
 RilObject.prototype[REQUEST_ISIM_AUTHENTICATION] = null;
 RilObject.prototype[REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU] = null;
 RilObject.prototype[REQUEST_STK_SEND_ENVELOPE_WITH_STATUS] = function REQUEST_STK_SEND_ENVELOPE_WITH_STATUS(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     this.acknowledgeGsmSms(false, PDU_FCS_UNSPECIFIED);
     return;
   }
 
   let Buf = this.context.Buf;
   let sw1 = Buf.readInt32();
   let sw2 = Buf.readInt32();
   if ((sw1 == ICC_STATUS_SAT_BUSY) && (sw2 === 0x00)) {
@@ -5571,48 +5537,48 @@ RilObject.prototype[REQUEST_STK_SEND_ENV
     this.acknowledgeGsmSms(success, success ? PDU_FCS_OK
                                          : PDU_FCS_USIM_DATA_DOWNLOAD_ERROR);
     return;
   }
 
   this.acknowledgeIncomingGsmSmsWithPDU(success, responsePduLen, options);
 };
 RilObject.prototype[REQUEST_VOICE_RADIO_TECH] = function REQUEST_VOICE_RADIO_TECH(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     if (DEBUG) {
       this.context.debug("Error when getting voice radio tech: " +
-                         options.rilRequestError);
+                         options.errorMsg);
     }
     return;
   }
   let radioTech = this.context.Buf.readInt32List();
   this._processRadioTech(radioTech[0]);
 };
 RilObject.prototype[REQUEST_GET_CELL_INFO_LIST] = null;
 RilObject.prototype[REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE] = null;
 RilObject.prototype[REQUEST_SET_INITIAL_ATTACH_APN] = null;
 RilObject.prototype[REQUEST_IMS_REGISTRATION_STATE] = null;
 RilObject.prototype[REQUEST_IMS_SEND_SMS] = null;
 RilObject.prototype[REQUEST_SIM_TRANSMIT_APDU_BASIC] = null;
 RilObject.prototype[REQUEST_SIM_OPEN_CHANNEL] = function REQUEST_SIM_OPEN_CHANNEL(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   options.channel = this.context.Buf.readInt32List()[0];
   // onwards may optionally contain the select response for the open channel
   // command with one byte per integer.
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_SIM_CLOSE_CHANNEL] = function REQUEST_SIM_CLOSE_CHANNEL(length, options) {
   this.sendDefaultResponse(options);
 };
 RilObject.prototype[REQUEST_SIM_TRANSMIT_APDU_CHANNEL] = function REQUEST_SIM_TRANSMIT_APDU_CHANNEL(length, options) {
-  if (options.rilRequestError) {
+  if (options.errorMsg) {
     this.sendChromeMessage(options);
     return;
   }
 
   let Buf = this.context.Buf;
   options.sw1 = Buf.readInt32();
   options.sw2 = Buf.readInt32();
   options.simResponse = Buf.readString();
@@ -5641,34 +5607,30 @@ RilObject.prototype[REQUEST_GET_DC_RT_IN
 RilObject.prototype[REQUEST_SET_DC_RT_INFO_RATE] = null;
 RilObject.prototype[REQUEST_SET_DATA_PROFILE] = null;
 RilObject.prototype[REQUEST_SHUTDOWN] = null;
 RilObject.prototype[REQUEST_SET_DATA_SUBSCRIPTION] = function REQUEST_SET_DATA_SUBSCRIPTION(length, options) {
   if (!options.rilMessageType) {
     // The request was made by ril_worker itself. Don't report.
     return;
   }
-  options.success = (options.rilRequestError === 0);
   this.sendChromeMessage(options);
 };
 RilObject.prototype[REQUEST_GET_UNLOCK_RETRY_COUNT] = function REQUEST_GET_UNLOCK_RETRY_COUNT(length, options) {
-  options.success = (options.rilRequestError === 0);
   options.retryCount = length ? this.context.Buf.readInt32List()[0] : -1;
   this.sendChromeMessage(options);
 };
 RilObject.prototype[RIL_REQUEST_GPRS_ATTACH] = function RIL_REQUEST_GPRS_ATTACH(length, options) {
   if (!options.rilMessageType) {
     // The request was made by ril_worker itself. Don't report.
     return;
   }
-  options.success = (options.rilRequestError === 0);
   this.sendChromeMessage(options);
 };
 RilObject.prototype[RIL_REQUEST_GPRS_DETACH] = function RIL_REQUEST_GPRS_DETACH(length, options) {
-  options.success = (options.rilRequestError === 0);
   this.sendChromeMessage(options);
 };
 RilObject.prototype[UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED] = function UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED() {
   let radioState = this.context.Buf.readInt32();
   let newState;
   switch (radioState) {
     case RADIO_STATE_UNAVAILABLE:
       newState = GECKO_RADIOSTATE_UNKNOWN;
@@ -5853,24 +5815,24 @@ RilObject.prototype[UNSOLICITED_NITZ_TIM
   this.sendChromeMessage({rilMessageType: "nitzTime",
                           networkTimeInMS: timeInMS,
                           networkTimeZoneInMinutes: -(tz * 15),
                           networkDSTInMinutes: -(dst * 60),
                           receiveTimeInMS: now});
 };
 
 RilObject.prototype[UNSOLICITED_SIGNAL_STRENGTH] = function UNSOLICITED_SIGNAL_STRENGTH(length) {
-  this[REQUEST_SIGNAL_STRENGTH](length, {rilRequestError: ERROR_SUCCESS});
+  this[REQUEST_SIGNAL_STRENGTH](length, {});
 };
 RilObject.prototype[UNSOLICITED_DATA_CALL_LIST_CHANGED] = function UNSOLICITED_DATA_CALL_LIST_CHANGED(length) {
   if (this.v5Legacy) {
     this.getDataCallList();
     return;
   }
-  this[REQUEST_DATA_CALL_LIST](length, {rilRequestError: ERROR_SUCCESS});
+  this[REQUEST_DATA_CALL_LIST](length, {});
 };
 RilObject.prototype[UNSOLICITED_SUPP_SVC_NOTIFICATION] = function UNSOLICITED_SUPP_SVC_NOTIFICATION(length) {
   let Buf = this.context.Buf;
   let info = {};
   info.notificationType = Buf.readInt32();
   info.code = Buf.readInt32();
   info.index = Buf.readInt32();
   info.type = Buf.readInt32();
--- a/dom/system/gonk/ril_worker_buf_object.js
+++ b/dom/system/gonk/ril_worker_buf_object.js
@@ -74,17 +74,16 @@
                              token + ". Ignored!");
         }
         return;
       }
 
       this.mTokenRequestMap.delete(token);
       requestType = options.rilRequestType;
 
-      options.rilRequestError = error;
       if (error !== ERROR_SUCCESS) {
         options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[error] ||
                            GECKO_ERROR_UNSPECIFIED_ERROR;
       }
       if (DEBUG) {
         this.context.debug("Solicited response for request type " + requestType +
                            ", token " + token + ", error " + error);
       }
@@ -121,17 +120,16 @@
     this.outgoingIndex = this.PARCEL_SIZE_SIZE;
     this.writeInt32(this._reMapRequestType(type));
     this.writeInt32(this.mToken);
 
     if (!options) {
       options = {};
     }
     options.rilRequestType = type;
-    options.rilRequestError = null;
     this.mTokenRequestMap.set(this.mToken, options);
     this.mToken++;
     return this.mToken;
   };
 
   BufObject.prototype.simpleRequest = function(type, options) {
     this.newParcel(type, options);
     this.sendParcel();
--- a/dom/system/gonk/tests/test_ril_worker_barring_password.js
+++ b/dom/system/gonk/tests/test_ril_worker_barring_password.js
@@ -43,19 +43,17 @@ add_test(function test_check_change_call
   let barringPasswordOptions;
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
 
   let context = worker.ContextPool._contexts[0];
   context.RIL.changeCallBarringPassword =
     function fakeChangeCallBarringPassword(options) {
       barringPasswordOptions = options;
-      context.RIL[REQUEST_CHANGE_BARRING_PASSWORD](0, {
-        rilRequestError: ERROR_SUCCESS
-      });
+      context.RIL[REQUEST_CHANGE_BARRING_PASSWORD](0, {});
     };
 
   context.RIL.changeCallBarringPassword({pin: PIN, newPin: NEW_PIN});
 
   let postedMessage = workerHelper.postedMessage;
   equal(barringPasswordOptions.pin, PIN);
   equal(barringPasswordOptions.newPin, NEW_PIN);
 
--- a/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
+++ b/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
@@ -151,17 +151,17 @@ add_test(function test_ril_worker_cellbr
 
   function test(aIsCdma, aSearchList, aExpected) {
     context.RIL._isCdma = aIsCdma;
 
     let options = { searchList: aSearchList };
     context.RIL.setCellBroadcastSearchList(options);
     // Enforce the MMI result to string for comparison.
     equal("" + context.RIL.cellBroadcastConfigs.MMI, aExpected);
-    equal(options.success, true);
+    do_check_eq(options.errorMsg, undefined);
   }
 
   let searchListStr = "1,2,3,4";
   let searchList = { gsm: "1,2,3,4", cdma: "5,6,7,8" };
 
   test(false, searchListStr, "1,2,2,3,3,4,4,5");
   test(true, searchListStr, "1,2,2,3,3,4,4,5");
   test(false, searchList, "1,2,2,3,3,4,4,5");
--- a/dom/system/gonk/tests/test_ril_worker_cf.js
+++ b/dom/system/gonk/tests/test_ril_worker_cf.js
@@ -53,45 +53,41 @@ add_test(function test_toaFromString_int
 });
 
 add_test(function test_setCallForward_unconditional() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCallForward = function fakeSetCallForward(options) {
-    context.RIL[REQUEST_SET_CALL_FORWARD](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_SET_CALL_FORWARD](0, {});
   };
 
   context.RIL.setCallForward({
     action: CALL_FORWARD_ACTION_REGISTRATION,
     reason: CALL_FORWARD_REASON_UNCONDITIONAL,
     serviceClass: ICC_SERVICE_CLASS_VOICE,
     number: "666222333",
     timeSeconds: 10
   });
 
   let postedMessage = workerHelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
 
   run_next_test();
 });
 
 add_test(function test_queryCallForwardStatus_unconditional() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCallForward = function fakeSetCallForward(options) {
-    context.RIL[REQUEST_SET_CALL_FORWARD](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_SET_CALL_FORWARD](0, {});
   };
 
   context.Buf.readInt32 = function fakeReadUint32() {
     return context.Buf.int32Array.pop();
   };
 
   context.Buf.readString = function fakeReadString() {
     return "+34666222333";
@@ -101,32 +97,30 @@ add_test(function test_queryCallForwardS
     context.Buf.int32Array = [
       0,   // rules.timeSeconds
       145, // rules.toa
       49,  // rules.serviceClass
       CALL_FORWARD_REASON_UNCONDITIONAL, // rules.reason
       1,   // rules.active
       1    // rulesLength
     ];
-    context.RIL[REQUEST_QUERY_CALL_FORWARD_STATUS](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CALL_FORWARD_STATUS](1, {});
   };
 
   context.RIL.queryCallForwardStatus({
     action: CALL_FORWARD_ACTION_QUERY_STATUS,
     reason: CALL_FORWARD_REASON_UNCONDITIONAL,
     serviceClass: ICC_SERVICE_CLASS_VOICE,
     number: "666222333",
     timeSeconds: 10
   });
 
   let postedMessage = workerHelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
   ok(Array.isArray(postedMessage.rules));
   do_print(postedMessage.rules.length);
   equal(postedMessage.rules.length, 1);
   ok(postedMessage.rules[0].active);
   equal(postedMessage.rules[0].reason, CALL_FORWARD_REASON_UNCONDITIONAL);
   equal(postedMessage.rules[0].number, "+34666222333");
   run_next_test();
 });
--- a/dom/system/gonk/tests/test_ril_worker_clip.js
+++ b/dom/system/gonk/tests/test_ril_worker_clip.js
@@ -16,27 +16,24 @@ add_test(function test_queryCLIP_provisi
     return context.Buf.int32Array.pop();
   };
 
   context.RIL.queryCLIP = function fakeQueryCLIP(options) {
     context.Buf.int32Array = [
       1,  // CLIP provisioned.
       1   // Length.
     ];
-    context.RIL[REQUEST_QUERY_CLIP](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CLIP](1, {});
   };
 
   context.RIL.queryCLIP({});
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
   equal(postedMessage.provisioned, 1);
   run_next_test();
 });
 
 add_test(function test_getCLIP_error_generic_failure_invalid_length() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
@@ -45,21 +42,18 @@ add_test(function test_getCLIP_error_gen
     return context.Buf.int32Array.pop();
   };
 
   context.RIL.queryCLIP = function fakeQueryCLIP(options) {
     context.Buf.int32Array = [
       1,  // CLIP provisioned.
       0   // Length.
     ];
-    context.RIL[REQUEST_QUERY_CLIP](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CLIP](1, {});
   };
 
   context.RIL.queryCLIP({});
 
   let postedMessage = workerHelper.postedMessage;
 
-  equal(postedMessage.errorMsg, "GenericFailure");
-  ok(!postedMessage.success);
+  equal(postedMessage.errorMsg, GECKO_ERROR_GENERIC_FAILURE);
   run_next_test();
 });
--- a/dom/system/gonk/tests/test_ril_worker_clir.js
+++ b/dom/system/gonk/tests/test_ril_worker_clir.js
@@ -18,54 +18,50 @@ function run_test() {
 
 add_test(function test_setCLIR_success() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCLIR = function fakeSetCLIR(options) {
     context.RIL[REQUEST_SET_CLIR](0, {
-      rilMessageType: "setCLIR",
-      rilRequestError: ERROR_SUCCESS
+      rilMessageType: "setCLIR"
     });
   };
 
   context.RIL.setCLIR({
     clirMode: CLIR_DEFAULT
   });
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
 
   run_next_test();
 });
 
 add_test(function test_setCLIR_generic_failure() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCLIR = function fakeSetCLIR(options) {
     context.RIL[REQUEST_SET_CLIR](0, {
       rilMessageType: "setCLIR",
-      rilRequestError: ERROR_GENERIC_FAILURE,
       errorMsg: GECKO_ERROR_GENERIC_FAILURE
     });
   };
 
   context.RIL.setCLIR({
     clirMode: CLIR_DEFAULT
   });
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, GECKO_ERROR_GENERIC_FAILURE);
-  ok(!postedMessage.success);
 
   run_next_test();
 });
 
 add_test(function test_getCLIR_n0_m1() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
@@ -77,27 +73,25 @@ add_test(function test_getCLIR_n0_m1() {
   context.RIL.getCLIR = function fakeGetCLIR(options) {
     context.Buf.int32Array = [
       1,  // Presentation indicator is used according to the subscription
           // of the CLIR service.
       0,  // CLIR provisioned in permanent mode.
       2   // Length.
     ];
     context.RIL[REQUEST_GET_CLIR](1, {
-      rilMessageType: "setCLIR",
-      rilRequestError: ERROR_SUCCESS
+      rilMessageType: "setCLIR"
     });
   };
 
   context.RIL.getCLIR({});
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
   equal(postedMessage.n, 0);
   equal(postedMessage.m, 1);
   run_next_test();
 });
 
 add_test(function test_getCLIR_error_generic_failure_invalid_length() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
@@ -110,21 +104,19 @@ add_test(function test_getCLIR_error_gen
   context.RIL.getCLIR = function fakeGetCLIR(options) {
     context.Buf.int32Array = [
       1,  // Presentation indicator is used according to the subscription
           // of the CLIR service.
       0,  // CLIR provisioned in permanent mode.
       0   // Length (invalid one).
     ];
     context.RIL[REQUEST_GET_CLIR](1, {
-      rilMessageType: "setCLIR",
-      rilRequestError: ERROR_SUCCESS
+      rilMessageType: "setCLIR"
     });
   };
 
   context.RIL.getCLIR({});
 
   let postedMessage = workerHelper.postedMessage;
 
-  equal(postedMessage.errorMsg, "GenericFailure");
-  ok(!postedMessage.success);
+  equal(postedMessage.errorMsg, GECKO_ERROR_GENERIC_FAILURE);
   run_next_test();
 });
--- a/dom/system/gonk/tests/test_ril_worker_cw.js
+++ b/dom/system/gonk/tests/test_ril_worker_cw.js
@@ -8,53 +8,48 @@ function run_test() {
 }
 
 add_test(function test_setCallWaiting_success() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCallWaiting = function fakeSetCallWaiting(options) {
-    context.RIL[REQUEST_SET_CALL_WAITING](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_SET_CALL_WAITING](0, {});
   };
 
   context.RIL.setCallWaiting({
     enabled: true
   });
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
 
   run_next_test();
 });
 
 add_test(function test_setCallWaiting_generic_failure() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCallWaiting = function fakeSetCallWaiting(options) {
     context.RIL[REQUEST_SET_CALL_WAITING](0, {
-      rilRequestError: ERROR_GENERIC_FAILURE,
       errorMsg: GECKO_ERROR_GENERIC_FAILURE
     });
   };
 
   context.RIL.setCallWaiting({
     enabled: true
   });
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, GECKO_ERROR_GENERIC_FAILURE);
-  ok(!postedMessage.success);
 
   run_next_test();
 });
 
 add_test(function test_queryCallWaiting_success_enabled_true() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
@@ -64,27 +59,24 @@ add_test(function test_queryCallWaiting_
   };
 
   context.RIL.queryCallWaiting = function fakeQueryCallWaiting(options) {
     context.Buf.int32Array = [
       1,  // serviceClass
       1,  // enabled
       1   // length
     ];
-    context.RIL[REQUEST_QUERY_CALL_WAITING](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CALL_WAITING](1, {});
   };
 
   context.RIL.queryCallWaiting({});
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
   equal(postedMessage.length, 1);
   ok(postedMessage.enabled);
   run_next_test();
 });
 
 add_test(function test_queryCallWaiting_success_enabled_false() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
@@ -95,23 +87,20 @@ add_test(function test_queryCallWaiting_
   };
 
   context.RIL.queryCallWaiting = function fakeQueryCallWaiting(options) {
     context.Buf.int32Array = [
       1,  // serviceClass
       0,  // enabled
       1   // length
     ];
-    context.RIL[REQUEST_QUERY_CALL_WAITING](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CALL_WAITING](1, {});
   };
 
   context.RIL.queryCallWaiting({});
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
   equal(postedMessage.length, 1);
   ok(!postedMessage.enabled);
   run_next_test();
 });
--- a/dom/system/gonk/tests/test_ril_worker_ecm.js
+++ b/dom/system/gonk/tests/test_ril_worker_ecm.js
@@ -146,18 +146,17 @@ add_test(function test_request_exit_emer
 
   let parcelTypes = [];
   context.Buf.newParcel = function(type, options) {
     parcelTypes.push(type);
   };
 
   context.RIL.handleChromeMessage({rilMessageType: "exitEmergencyCbMode"});
   context.RIL[REQUEST_EXIT_EMERGENCY_CALLBACK_MODE](1, {
-    rilMessageType: "exitEmergencyCbMode",
-    rilRequestError: ERROR_SUCCESS
+    rilMessageType: "exitEmergencyCbMode"
   });
   let postedMessage = workerHelper.postedMessage;
 
   // Should clear timeout event.
   equal(context.RIL._exitEmergencyCbModeTimeoutID, null);
 
   // Check indeed sent out REQUEST_EXIT_EMERGENCY_CALLBACK_MODE.
   notEqual(parcelTypes.indexOf(REQUEST_EXIT_EMERGENCY_CALLBACK_MODE), -1);
--- a/dom/system/gonk/tests/test_ril_worker_icc_ICCContactHelper.js
+++ b/dom/system/gonk/tests/test_ril_worker_icc_ICCContactHelper.js
@@ -86,17 +86,19 @@ add_test(function test_error_message_upd
     options.callback(options);
   };
 
   do_test({contactType: GECKO_CARDCONTACT_TYPE_ADN, contact: {}},
           CONTACT_ERR_NO_FREE_RECORD_FOUND);
 
   // Error 6, ICC IO Error.
   io.loadLinearFixedEF = function(options) {
-    ril[REQUEST_SIM_IO](0, {rilRequestError: ERROR_GENERIC_FAILURE});
+    ril[REQUEST_SIM_IO](0, {
+      errorMsg: GECKO_ERROR_GENERIC_FAILURE
+    });
   };
   do_test({contactType: GECKO_CARDCONTACT_TYPE_ADN,
            contact: {contactId: ICCID + "1"}},
           GECKO_ERROR_GENERIC_FAILURE);
 
   // Error 7, suppose we update the supported PBR fields in USIM_PBR_FIELDS,
   // but forget to add implemenetations for it.
   USIM_PBR_FIELDS.push("pbc");
--- a/dom/system/gonk/tests/test_ril_worker_icc_ICCIOHelper.js
+++ b/dom/system/gonk/tests/test_ril_worker_icc_ICCIOHelper.js
@@ -67,18 +67,17 @@ add_test(function test_process_icc_io_er
       called = true;
       equal(errorMsg, expectedErrorMsg);
     }
 
     // Write sw1 and sw2 to buffer.
     buf.writeInt32(sw1);
     buf.writeInt32(sw2);
 
-    context.RIL[REQUEST_SIM_IO](0, {rilRequestError: ERROR_SUCCESS,
-                                    fileId: 0xffff,
+    context.RIL[REQUEST_SIM_IO](0, {fileId: 0xffff,
                                     command: 0xff,
                                     onerror: errorCb});
 
     // onerror callback should be triggered.
     ok(called);
   }
 
   let TEST_DATA = [
--- a/dom/system/gonk/tests/test_ril_worker_mmi.js
+++ b/dom/system/gonk/tests/test_ril_worker_mmi.js
@@ -50,51 +50,46 @@ add_test(function test_sendMMI_short_cod
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   let ussdOptions;
 
   context.RIL.sendUSSD = function fakeSendUSSD(options){
     ussdOptions = options;
-    context.RIL[REQUEST_SEND_USSD](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
-
+    context.RIL[REQUEST_SEND_USSD](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: {fullMMI: "**"}});
 
   let postedMessage = workerhelper.postedMessage;
   equal(ussdOptions.ussd, "**");
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
   ok(context.RIL._ussdSession);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_change_PIN() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.changeICCPIN = function fakeChangeICCPIN(options) {
-    context.RIL[REQUEST_ENTER_SIM_PIN](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_ENTER_SIM_PIN](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("**", "04", "1234", "4567",
                                              "4567")});
 
   let postedMessage = workerhelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_change_PIN_no_new_PIN() {
   testSendMMI(createMMIOptions("**", "04", "1234", "", "4567"),
               MMI_ERROR_KS_ERROR);
 
@@ -122,29 +117,27 @@ add_test(function test_sendMMI_change_PI
   run_next_test();
 });
 
 add_test(function test_sendMMI_change_PIN2() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
-  context.RIL.changeICCPIN2 = function fakeChangeICCPIN2(options){
-    context.RIL[REQUEST_ENTER_SIM_PIN2](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+  context.RIL.changeICCPIN2 = function fakeChangeICCPIN2(options) {
+    context.RIL[REQUEST_ENTER_SIM_PIN2](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("**", "042", "1234", "4567",
                                              "4567")});
 
   let postedMessage = workerhelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_change_PIN2_no_new_PIN2() {
   testSendMMI(createMMIOptions("**", "042", "1234", "", "4567"),
               MMI_ERROR_KS_ERROR);
 
@@ -172,29 +165,27 @@ add_test(function test_sendMMI_change_PI
   run_next_test();
 });
 
 add_test(function test_sendMMI_unblock_PIN() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
-  context.RIL.enterICCPUK = function fakeEnterICCPUK(options){
-    context.RIL[REQUEST_ENTER_SIM_PUK](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+  context.RIL.enterICCPUK = function fakeEnterICCPUK(options) {
+    context.RIL[REQUEST_ENTER_SIM_PUK](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("**", "05", "1234", "4567",
                                              "4567")});
 
   let postedMessage = workerhelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_unblock_PIN_no_new_PIN() {
   testSendMMI(createMMIOptions("**", "05", "1234", "", "4567"),
               MMI_ERROR_KS_ERROR);
 
@@ -222,29 +213,27 @@ add_test(function test_sendMMI_unblock_P
   run_next_test();
 });
 
 add_test(function test_sendMMI_unblock_PIN2() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
-  context.RIL.enterICCPUK2 = function fakeEnterICCPUK2(options){
-    context.RIL[REQUEST_ENTER_SIM_PUK2](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+  context.RIL.enterICCPUK2 = function fakeEnterICCPUK2(options) {
+    context.RIL[REQUEST_ENTER_SIM_PUK2](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("**", "052", "1234", "4567",
                                              "4567")});
 
   let postedMessage = workerhelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_unblock_PIN2_no_new_PIN2() {
   testSendMMI(createMMIOptions("**", "052", "1234", "", "4567"),
               MMI_ERROR_KS_ERROR);
 
@@ -273,140 +262,133 @@ add_test(function test_sendMMI_unblock_P
 });
 
 add_test(function test_sendMMI_get_IMEI() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
   let mmiOptions;
 
-  context.RIL.getIMEI = function getIMEI(options){
+  context.RIL.getIMEI = function getIMEI(options) {
     mmiOptions = options;
-    context.RIL[REQUEST_SEND_USSD](0, {
-      rilRequestError: ERROR_SUCCESS,
-    });
+    context.RIL[REQUEST_SEND_USSD](0, {});
   };
 
   context.RIL.sendMMI({mmi: createMMIOptions("*#", "06")});
 
   let postedMessage = workerhelper.postedMessage;
 
   notEqual(mmiOptions.mmi, null);
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_get_IMEI_error() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
   let mmiOptions;
 
   context.RIL.getIMEI = function getIMEI(options){
     mmiOptions = options;
     context.RIL[REQUEST_SEND_USSD](0, {
-      rilRequestError: ERROR_RADIO_NOT_AVAILABLE,
       errorMsg: GECKO_ERROR_RADIO_NOT_AVAILABLE
     });
   };
 
   context.RIL.sendMMI({mmi: createMMIOptions("*#", "06")});
 
   let postedMessage = workerhelper.postedMessage;
 
   notEqual(mmiOptions.mmi, null);
   equal (postedMessage.errorMsg, GECKO_ERROR_RADIO_NOT_AVAILABLE);
-  ok(!postedMessage.success);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_call_barring_BAIC_interrogation_voice() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.Buf.readInt32List = function fakeReadUint32List() {
     return [1];
   };
 
   context.RIL.queryICCFacilityLock =
-    function fakeQueryICCFacilityLock(options){
+    function fakeQueryICCFacilityLock(options) {
       context.RIL[REQUEST_QUERY_FACILITY_LOCK](1, {
-        rilMessageType: "sendMMI",
-        rilRequestError: ERROR_SUCCESS
+        rilMessageType: "sendMMI"
       });
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("*#", "33")});
 
   let postedMessage = workerhelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
   ok(postedMessage.enabled);
   equal(postedMessage.statusMessage,  MMI_SM_KS_SERVICE_ENABLED_FOR);
   ok(Array.isArray(postedMessage.additionalInformation));
   equal(postedMessage.additionalInformation[0], "serviceClassVoice");
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_call_barring_BAIC_activation() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
   let mmiOptions;
 
   context.RIL.setICCFacilityLock =
-    function fakeSetICCFacilityLock(options){
+    function fakeSetICCFacilityLock(options) {
       mmiOptions = options;
       context.RIL[REQUEST_SET_FACILITY_LOCK](0, {
         rilMessageType: "sendMMI",
-        procedure: MMI_PROCEDURE_ACTIVATION,
-        rilRequestError: ERROR_SUCCESS
+        procedure: MMI_PROCEDURE_ACTIVATION
       });
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("*", "33")});
 
   let postedMessage = workerhelper.postedMessage;
 
   equal(mmiOptions.procedure, MMI_PROCEDURE_ACTIVATION);
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
   equal(postedMessage.statusMessage,  MMI_SM_KS_SERVICE_ENABLED);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_call_barring_BAIC_deactivation() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
   let mmiOptions;
 
   context.RIL.setICCFacilityLock =
-    function fakeSetICCFacilityLock(options){
+    function fakeSetICCFacilityLock(options) {
       mmiOptions = options;
       context.RIL[REQUEST_SET_FACILITY_LOCK](0, {
         rilMessageType: "sendMMI",
-        procedure: MMI_PROCEDURE_DEACTIVATION,
-        rilRequestError: ERROR_SUCCESS
+        procedure: MMI_PROCEDURE_DEACTIVATION
       });
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("#", "33")});
 
   let postedMessage = workerhelper.postedMessage;
 
   equal(mmiOptions.procedure, MMI_PROCEDURE_DEACTIVATION);
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
   equal(postedMessage.statusMessage,  MMI_SM_KS_SERVICE_DISABLED);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_call_barring_BAIC_procedure_not_supported() {
   testSendMMI(createMMIOptions("**", "33", "0000"), MMI_ERROR_KS_NOT_SUPPORTED);
 
@@ -414,79 +396,73 @@ add_test(function test_sendMMI_call_barr
 });
 
 add_test(function test_sendMMI_USSD() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
   let ussdOptions;
 
-  context.RIL.sendUSSD = function fakeSendUSSD(options){
+  context.RIL.sendUSSD = function fakeSendUSSD(options) {
     ussdOptions = options;
-    context.RIL[REQUEST_SEND_USSD](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_SEND_USSD](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("*", "123")});
 
   let postedMessage = workerhelper.postedMessage;
 
   equal(ussdOptions.ussd, "**123#");
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
   ok(context.RIL._ussdSession);
 
   run_next_test();
 });
 
 add_test(function test_sendMMI_USSD_error() {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
   let ussdOptions;
 
   context.RIL.sendUSSD = function fakeSendUSSD(options){
     ussdOptions = options;
     context.RIL[REQUEST_SEND_USSD](0, {
-      rilRequestError: ERROR_GENERIC_FAILURE,
       errorMsg: GECKO_ERROR_GENERIC_FAILURE
     });
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("*", "123")});
 
   let postedMessage = workerhelper.postedMessage;
 
   equal(ussdOptions.ussd, "**123#");
   equal(postedMessage.errorMsg, GECKO_ERROR_GENERIC_FAILURE);
-  ok(!postedMessage.success);
   ok(!context.RIL._ussdSession);
 
   run_next_test();
 });
 
 function setCallWaitingSuccess(mmi) {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCallWaiting = function fakeSetCallWaiting(options) {
-    context.RIL[REQUEST_SET_CALL_WAITING](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_SET_CALL_WAITING](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: mmi});
 
   let postedMessage = workerhelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
 }
 
 add_test(function test_sendMMI_call_waiting_activation() {
   setCallWaitingSuccess(createMMIOptions("*", "43", "10"));
 
   run_next_test();
 });
 
@@ -518,23 +494,21 @@ add_test(function test_sendMMI_call_wait
   };
 
   context.RIL.queryCallWaiting = function fakeQueryCallWaiting(options) {
     context.Buf.int32Array = [
       7,   // serviceClass
       1,   // enabled
       2    // length
     ];
-    context.RIL[REQUEST_QUERY_CALL_WAITING](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CALL_WAITING](1, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("*#", "43")});
 
   let postedMessage = workerhelper.postedMessage;
 
-  ok(postedMessage.success);
+  equal(postedMessage.errorMsg, undefined);
   equal(postedMessage.length, 2);
   ok(postedMessage.enabled);
   run_next_test();
 });
--- a/dom/system/gonk/tests/test_ril_worker_mmi_cf.js
+++ b/dom/system/gonk/tests/test_ril_worker_mmi_cf.js
@@ -21,29 +21,26 @@ function createMMIOptions(procedure, ser
 }
 
 function setCallForwardSuccess(procedure, serviceCode, sia, sib, sic) {
   let workerhelper = newInterceptWorker();
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setCallForward = function fakeSetCallForward(options) {
-    context.RIL[REQUEST_SET_CALL_FORWARD](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_SET_CALL_FORWARD](0, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions(procedure, serviceCode, sia, sib,
                                              sic)});
 
   let postedMessage = workerhelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
 }
 
 add_test(function test_sendMMI_call_forwarding_activation() {
   setCallForwardSuccess("*", "21", "12345", "99", "10");
 
   run_next_test();
 });
 
@@ -70,28 +67,25 @@ add_test(function test_sendMMI_call_forw
     context.Buf.int32Array = [
       0,   // rules.timeSeconds
       145, // rules.toa
       49,  // rules.serviceClass
       CALL_FORWARD_REASON_UNCONDITIONAL, // rules.reason
       1,   // rules.active
       1    // rulesLength
     ];
-    context.RIL[REQUEST_QUERY_CALL_FORWARD_STATUS](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CALL_FORWARD_STATUS](1, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("*#", "21")});
 
   let postedMessage = workerhelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
-  ok(postedMessage.success);
   ok(Array.isArray(postedMessage.rules));
   equal(postedMessage.rules.length, 1);
   ok(postedMessage.rules[0].active);
   equal(postedMessage.rules[0].reason, CALL_FORWARD_REASON_UNCONDITIONAL);
   equal(postedMessage.rules[0].number, "+34666222333");
   run_next_test();
 });
 
@@ -100,28 +94,25 @@ add_test(function test_sendMMI_call_forw
   let worker = workerhelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.Buf.readInt32 = function fakeReadUint32() {
     return 0;
   };
 
   context.RIL.queryCallForwardStatus = function fakeQueryCallForward(options) {
-    context.RIL[REQUEST_QUERY_CALL_FORWARD_STATUS](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_QUERY_CALL_FORWARD_STATUS](1, {});
   };
 
   context.RIL.radioState = GECKO_RADIOSTATE_ENABLED;
   context.RIL.sendMMI({mmi: createMMIOptions("*#", "21")});
 
   let postedMessage = workerhelper.postedMessage;
 
   equal(postedMessage.errorMsg, GECKO_ERROR_GENERIC_FAILURE);
-  ok(!postedMessage.success);
 
   run_next_test();
 });
 
 
 add_test(function test_sendMMI_call_forwarding_registration() {
   setCallForwardSuccess("**", "21", "12345", "99", "10");
 
--- a/dom/system/gonk/tests/test_ril_worker_voiceprivacy.js
+++ b/dom/system/gonk/tests/test_ril_worker_voiceprivacy.js
@@ -8,19 +8,17 @@ function run_test() {
 }
 
 add_test(function test_setVoicePrivacyMode_success() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setVoicePrivacyMode = function fakeSetVoicePrivacyMode(options) {
-    context.RIL[REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE](0, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE](0, {});
   };
 
   context.RIL.setVoicePrivacyMode({
     enabled: true
   });
 
   let postedMessage = workerHelper.postedMessage;
 
@@ -31,17 +29,16 @@ add_test(function test_setVoicePrivacyMo
 
 add_test(function test_setVoicePrivacyMode_generic_failure() {
   let workerHelper = newInterceptWorker();
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.RIL.setVoicePrivacyMode = function fakeSetVoicePrivacyMode(options) {
     context.RIL[REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE](0, {
-      rilRequestError: ERROR_GENERIC_FAILURE,
       errorMsg: GECKO_ERROR_GENERIC_FAILURE
     });
   };
 
   context.RIL.setVoicePrivacyMode({
     enabled: true
   });
 
@@ -57,19 +54,17 @@ add_test(function test_queryVoicePrivacy
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.Buf.readInt32List = function fakeReadUint32List() {
     return [1];
   };
 
   context.RIL.queryVoicePrivacyMode = function fakeQueryVoicePrivacyMode(options) {
-    context.RIL[REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE](1, {});
   };
 
   context.RIL.queryVoicePrivacyMode();
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
   ok(postedMessage.enabled);
@@ -81,19 +76,17 @@ add_test(function test_queryVoicePrivacy
   let worker = workerHelper.worker;
   let context = worker.ContextPool._contexts[0];
 
   context.Buf.readInt32List = function fakeReadUint32List() {
     return [0];
   };
 
   context.RIL.queryVoicePrivacyMode = function fakeQueryVoicePrivacyMode(options) {
-    context.RIL[REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE](1, {
-      rilRequestError: ERROR_SUCCESS
-    });
+    context.RIL[REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE](1, {});
   };
 
   context.RIL.queryVoicePrivacyMode();
 
   let postedMessage = workerHelper.postedMessage;
 
   equal(postedMessage.errorMsg, undefined);
   ok(!postedMessage.enabled);
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -608,19 +608,22 @@ Telephony::GetReady(ErrorResult& aRv) co
 
   nsRefPtr<Promise> promise = mReadyPromise;
   return promise.forget();
 }
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
-Telephony::CallStateChanged(nsITelephonyCallInfo* aInfo)
+Telephony::CallStateChanged(uint32_t aLength, nsITelephonyCallInfo** aAllInfo)
 {
-  return HandleCallInfo(aInfo);
+  for (uint32_t i = 0; i < aLength; ++i) {
+    HandleCallInfo(aAllInfo[i]);
+  }
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 Telephony::EnumerateCallState(nsITelephonyCallInfo* aInfo)
 {
   return HandleCallInfo(aInfo);
 }
 
--- a/dom/telephony/gonk/TelephonyService.js
+++ b/dom/telephony/gonk/TelephonyService.js
@@ -778,17 +778,17 @@ TelephonyService.prototype = {
         aCallback.notifyError(aErrorMsg);
       }
     });
   },
 
   _dialCdmaThreeWayCall: function(aClientId, aNumber, aCallback) {
     this._sendToRilWorker(aClientId, "cdmaFlash", { featureStr: aNumber },
                           response => {
-      if (!response.success) {
+      if (response.errorMsg) {
         aCallback.notifyError(response.errorMsg);
         return;
       }
 
       // RIL doesn't hold the 2nd call. We create one by ourselves.
       aCallback.notifyDialCallSuccess(aClientId, CDMA_SECOND_CALL_INDEX,
                                       aNumber);
 
@@ -800,37 +800,36 @@ TelephonyService.prototype = {
       childCall.number = aNumber;
       childCall.isOutgoing = true;
       childCall.isEmergency = gDialNumberUtils.isEmergency(aNumber);
       childCall.isConference = false;
       childCall.isSwitchable = false;
       childCall.isMergeable = true;
 
       // Manual update call state according to the request response.
-      this._handleCallStateChanged(aClientId, childCall);
+      this._handleCallStateChanged(aClientId, [childCall]);
 
       childCall.state = nsITelephonyService.CALL_STATE_CONNECTED;
-      this._handleCallStateChanged(aClientId, childCall);
 
       let parentCall = this._currentCalls[aClientId][childCall.parentId];
       parentCall.childId = CDMA_SECOND_CALL_INDEX;
       parentCall.state = nsITelephonyService.CALL_STATE_HELD;
       parentCall.isSwitchable = false;
       parentCall.isMergeable = true;
-      this._handleCallStateChanged(aClientId, parentCall);
+      this._handleCallStateChanged(aClientId, [childCall, parentCall]);
     });
   },
 
   _sendDialCallRequest: function(aClientId, aOptions, aCallback) {
     this._isDialing = true;
 
     this._sendToRilWorker(aClientId, "dial", aOptions, response => {
       this._isDialing = false;
 
-      if (!response.success) {
+      if (response.errorMsg) {
         this._sendToRilWorker(aClientId, "getFailCause", null, response => {
           aCallback.notifyError(response.failCause);
         });
       } else {
         this._ongoingDial = {
           clientId: aClientId,
           callback: aCallback
         };
@@ -853,17 +852,17 @@ TelephonyService.prototype = {
       this._serviceCodeToKeyString(aMmi.serviceCode) : RIL.MMI_KS_SC_USSD;
 
     aCallback.notifyDialMMI(mmiServiceCode);
 
     this._sendToRilWorker(aClientId, "sendMMI",
                           { mmi: aMmi }, response => {
       if (DEBUG) debug("MMI response: " + JSON.stringify(response));
 
-      if (!response.success) {
+      if (response.errorMsg) {
         if (response.additionalInformation != null) {
           aCallback.notifyDialMMIErrorWithInfo(response.errorMsg,
                                                response.additionalInformation);
         } else {
           aCallback.notifyDialMMIError(response.errorMsg);
         }
         return;
       }
@@ -969,17 +968,17 @@ TelephonyService.prototype = {
    * The default callback handler for call operations.
    *
    * @param aCallback
    *        An callback object including notifySuccess() and notifyError(aMsg)
    * @param aResponse
    *        The response from ril_worker.
    */
   _defaultCallbackHandler: function(aCallback, aResponse) {
-    if (!aResponse.success) {
+    if (aResponse.errorMsg) {
       aCallback.notifyError(aResponse.errorMsg);
     } else {
       aCallback.notifySuccess();
     }
   },
 
   _getCallsWithState: function(aClientId, aState) {
     let calls = [];
@@ -1021,17 +1020,17 @@ TelephonyService.prototype = {
       aCall.started = new Date().getTime();
     }
 
     return change;
   },
 
   /**
    * Identify the conference group.
-   * Return the conference state and a array of calls in group.
+   * @return [conference state, array of calls in group]
    *
    * TODO: handle multi-sim case.
    */
   _detectConference: function(aClientId) {
     // There are some difficuties to identify the conference by |.isMpty| from RIL
     // so we don't rely on this flag.
     //  - |.isMpty| becomes false when the conference call is put on hold.
     //  - |.isMpty| may remain true when other participants left the conference.
@@ -1046,23 +1045,47 @@ TelephonyService.prototype = {
       return [nsITelephonyService.CALL_STATE_CONNECTED, connectedCalls];
     } else if (heldCalls.length >= 2) {
       return [nsITelephonyService.CALL_STATE_HELD, heldCalls];
     }
 
     return [nsITelephonyService.CALL_STATE_UNKNOWN, null];
   },
 
+  /**
+   * Update the isConference flag of all Calls.
+   *
+   * @return [conference state, array of calls being updated]
+   */
+  _updateConference: function(aClientId) {
+    let [newConferenceState, conferenceCalls] = this._detectConference(aClientId);
+    if (DEBUG) debug("Conference state: " + newConferenceState);
+
+    let changedCalls = [];
+    let conference = new Set(conferenceCalls);
+
+    for (let i in this._currentCalls[aClientId]) {
+      let call = this._currentCalls[aClientId][i];
+      let isConference = conference.has(call);
+      if (call.isConference != isConference) {
+        call.isConference = isConference;
+        changedCalls.push(call);
+      }
+    }
+
+    return [newConferenceState, changedCalls];
+  },
+
   sendTones: function(aClientId, aDtmfChars, aPauseDuration, aToneDuration,
                       aCallback) {
     let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     let tones = aDtmfChars;
     let playTone = (tone) => {
       this._sendToRilWorker(aClientId, "startTone", { dtmfChar: tone }, response => {
-        if (!response.success) {
+        if (response.errorMsg) {
           aCallback.notifyError(response.errorMsg);
           return;
         }
 
         timer.initWithCallback(() => {
           this.stopTone();
           timer.initWithCallback(() => {
             if (tones.length === 1) {
@@ -1214,17 +1237,17 @@ TelephonyService.prototype = {
 
   resumeCall: function(aClientId, aCallIndex, aCallback) {
     this._switchCall(aClientId, aCallIndex, aCallback,
                      nsITelephonyService.CALL_STATE_HELD);
   },
 
   _conferenceCallGsm: function(aClientId, aCallback) {
     this._sendToRilWorker(aClientId, "conferenceCall", null, response => {
-      if (!response.success) {
+      if (response.errorMsg) {
         aCallback.notifyError(RIL.GECKO_ERROR_GENERIC_FAILURE);
         // TODO: Bug 1124993. Deprecate it. Use callback response is enough.
         this._notifyAllListeners("notifyConferenceError",
                                  ["addError", response.errorMsg]);
         return;
       }
 
       aCallback.notifySuccess();
@@ -1236,30 +1259,32 @@ TelephonyService.prototype = {
       let call = this._currentCalls[aClientId][index];
       if (!call.isMergeable) {
         aCallback.notifyError(RIL.GECKO_ERROR_GENERIC_FAILURE);
         return;
       }
     }
 
     this._sendToRilWorker(aClientId, "cdmaFlash", null, response => {
-      if (!response.success) {
+      if (response.errorMsg) {
         aCallback.notifyError(RIL.GECKO_ERROR_GENERIC_FAILURE);
         // TODO: Bug 1124993. Deprecate it. Use callback response is enough.
         this._notifyAllListeners("notifyConferenceError",
                                  ["addError", response.errorMsg]);
         return;
       }
 
+      let calls = [];
       for (let index in this._currentCalls[aClientId]) {
         let call = this._currentCalls[aClientId][index];
         call.state = nsITelephonyService.CALL_STATE_CONNECTED;
         call.isConference = true;
-        this._handleCallStateChanged(aClientId, call);
+        calls.push(call);
       }
+      this._handleCallStateChanged(aClientId, calls);
       this._handleConferenceCallStateChanged(nsITelephonyService.CALL_STATE_CONNECTED);
 
       aCallback.notifySuccess();
     });
   },
 
   conferenceCall: function(aClientId, aCallback) {
     if (Object.keys(this._currentCalls[aClientId]).length < 2) {
@@ -1272,44 +1297,55 @@ TelephonyService.prototype = {
     } else {
       this._conferenceCallGsm(aClientId, aCallback);
     }
   },
 
   _separateCallGsm: function(aClientId, aCallIndex, aCallback) {
     this._sendToRilWorker(aClientId, "separateCall", { callIndex: aCallIndex },
                           response => {
-      if (!response.success) {
+      if (response.errorMsg) {
         aCallback.notifyError(RIL.GECKO_ERROR_GENERIC_FAILURE);
         // TODO: Bug 1124993. Deprecate it. Use callback response is enough.
         this._notifyAllListeners("notifyConferenceError",
                                  ["removeError", response.errorMsg]);
         return;
       }
 
       aCallback.notifySuccess();
     });
   },
 
+  _removeCdmaSecondCall: function(aClientId) {
+    let childCall = this._currentCalls[aClientId][CDMA_SECOND_CALL_INDEX];
+    let parentCall = this._currentCalls[aClientId][CDMA_FIRST_CALL_INDEX];
+
+    this._disconnectCalls(aClientId, [childCall]);
+
+    parentCall.isConference = false;
+    parentCall.isSwitchable = true;
+    parentCall.isMergeable = true;
+    this._handleCallStateChanged(aClientId, [childCall, parentCall]);
+    this._handleConferenceCallStateChanged(nsITelephonyService.CALL_STATE_UNKNOWN);
+  },
+
   // See 3gpp2, S.R0006-522-A v1.0. Table 4, XID 6S.
   // Release the third party. Optionally apply a warning tone. Connect the
   // controlling subscriber and the second party. Go to the 2-way state.
   _separateCallCdma: function(aClientId, aCallIndex, aCallback) {
     this._sendToRilWorker(aClientId, "cdmaFlash", null, response => {
-      if (!response.success) {
+      if (response.errorMsg) {
         aCallback.notifyError(RIL.GECKO_ERROR_GENERIC_FAILURE);
         // TODO: Bug 1124993. Deprecate it. Use callback response is enough.
         this._notifyAllListeners("notifyConferenceError",
                                  ["removeError", response.errorMsg]);
         return;
       }
 
-      let childCall = this._currentCalls[aClientId][CDMA_SECOND_CALL_INDEX];
-      this._handleCallDisconnected(aClientId, childCall);
-
+      this._removeCdmaSecondCall(aClientId);
       aCallback.notifySuccess();
     });
   },
 
   separateCall: function(aClientId, aCallIndex, aCallback) {
     let call = this._currentCalls[aClientId][aCallIndex];
     if (!call || !call.isConference) {
       aCallback.notifyError(RIL.GECKO_ERROR_GENERIC_FAILURE);
@@ -1382,76 +1418,85 @@ TelephonyService.prototype = {
   set speakerEnabled(aEnabled) {
     gAudioService.speakerEnabled = aEnabled;
   },
 
   /**
    * nsIGonkTelephonyService interface.
    */
 
-  /**
-   * Handle call disconnects by updating our current state and the audio system.
-   */
-  _handleCallDisconnected: function(aClientId, aCall) {
-    if (DEBUG) debug("handleCallDisconnected: " + JSON.stringify(aCall));
-
-    aCall.state = nsITelephonyService.CALL_STATE_DISCONNECTED;
+  _notifyCallEnded: function(aCall) {
     let duration = ("started" in aCall && typeof aCall.started == "number") ?
       new Date().getTime() - aCall.started : 0;
 
-    gTelephonyMessenger.notifyCallEnded(aClientId,
+    gTelephonyMessenger.notifyCallEnded(aCall.clientId,
                                         aCall.number,
                                         this._cdmaCallWaitingNumber,
                                         aCall.isEmergency,
                                         duration,
                                         aCall.isOutgoing,
                                         aCall.hangUpLocal);
 
     // Clear cache of this._cdmaCallWaitingNumber after call disconnected.
     this._cdmaCallWaitingNumber = null;
+  },
 
-    let manualConfStateChange = false;
-    let childId = this._currentCalls[aClientId][aCall.callIndex].childId;
-    if (childId) {
-      // Child cannot live without parent.
-      let childCall = this._currentCalls[aClientId][childId];
-      this._handleCallDisconnected(aClientId, childCall);
-    } else {
-      let parentId = this._currentCalls[aClientId][aCall.callIndex].parentId;
-      if (parentId) {
-        let parentCall = this._currentCalls[aClientId][parentId];
-        // The child is going to be released.
-        delete parentCall.childId;
-        if (parentCall.isConference) {
-          // As the child is going to be gone, the parent should be moved out
-          // of conference accordingly.
-          manualConfStateChange = true;
-          parentCall.isConference = false;
-          parentCall.isSwitchable = true;
-          parentCall.isMergeable = true;
-          aCall.isConference = false;
-          this._handleCallStateChanged(aClientId, parentCall);
-        }
+  /**
+   * Disconnect calls by updating their states. Sometimes, it may cause other
+   * calls being disconnected as well.
+   *
+   * @return Array a list of calls we need to fire callStateChange
+   *
+   * TODO: The list currently doesn't contain calls that we fire notifyError
+   * for them. However, after Bug 1147736, notifyError is replaced by
+   * callStateChanged and those calls should be included in the list.
+   */
+  _disconnectCalls: function(aClientId, aCalls,
+                             aFailCause = RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
+    if (DEBUG) debug("_disconnectCalls: " + JSON.stringify(aCalls));
+
+    // Child cannot live without parent. Let's find all the calls that need to
+    // be disconnected.
+    let disconnectedCalls = aCalls.slice();
+
+    for (let call in aCalls) {
+      while (call.childId) {
+        call = this._currentCalls[aClientId][call.childId];
+        disconnectedCalls.push(call);
       }
     }
 
-    if (aCall.hangUpLocal || !aCall.failCause ||
-        aCall.failCause === RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
-      let callInfo = new TelephonyCallInfo(aCall);
-      this._notifyAllListeners("callStateChanged", [callInfo]);
-    } else {
-      this._notifyAllListeners("notifyError",
-                               [aClientId, aCall.callIndex, aCall.failCause]);
-    }
+    // Store unique value in the list.
+    disconnectedCalls = [...Set(disconnectedCalls)];
+
+    let callsForStateChanged = [];
+
+    disconnectedCalls.forEach(call => {
+      call.state = nsITelephonyService.CALL_STATE_DISCONNECTED;
+      call.failCause = aFailCause;
+
+      if (call.parentId) {
+        let parentCall = this._currentCalls[aClientId][call.parentId];
+        delete parentCall.childId;
+      }
 
-    delete this._currentCalls[aClientId][aCall.callIndex];
+      this._notifyCallEnded(call);
 
-    if (manualConfStateChange) {
-      this._handleConferenceCallStateChanged(nsITelephonyService.CALL_STATE_UNKNOWN);
-    }
+      if (call.hangUpLocal || !call.failCause ||
+          call.failCause === RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
+        callsForStateChanged.push(call);
+      } else {
+        this._notifyAllListeners("notifyError",
+                                 [aClientId, call.callIndex, call.failCause]);
+      }
+
+      delete this._currentCalls[aClientId][call.callIndex];
+    });
+
+    return callsForStateChanged;
   },
 
   /**
    * Handle an incoming call.
    *
    * Not much is known about this call at this point, but it's enough
    * to start bringing up the Phone app already.
    */
@@ -1526,37 +1571,24 @@ TelephonyService.prototype = {
                                                            call.number);
           this._ongoingDial = null;
         }
       }
     }
 
     // For correct conference detection, we should mark removedCalls as
     // DISCONNECTED first.
-    removedCalls.forEach(call => {
-      call.state = nsITelephonyService.CALL_STATE_DISCONNECTED;
-      call.failCause = aFailCause;
-      this._handleCallDisconnected(aClientId, call);
-    });
+    let disconnectedCalls = this._disconnectCalls(aClientId, [...removedCalls], aFailCause);
+    disconnectedCalls.forEach(call => changedCalls.add(call));
 
     // Detect conference and update isConference flag.
-    let [newConferenceState, conferenceCalls] = this._detectConference(aClientId);
-    if (DEBUG) debug("Conference state: " + newConferenceState);
+    let [newConferenceState, conferenceChangedCalls] = this._updateConference(aClientId);
+    conferenceChangedCalls.forEach(call => changedCalls.add(call));
 
-    let conference = new Set(conferenceCalls);
-    for (let i in this._currentCalls[aClientId]) {
-      let call = this._currentCalls[aClientId][i];
-      let isConference = conference.has(call);
-      if (call.isConference != isConference) {
-        call.isConference = isConference;
-        changedCalls.add(call);
-      }
-    }
-
-    changedCalls.forEach(call => this._handleCallStateChanged(aClientId, call));
+    this._handleCallStateChanged(aClientId, [...changedCalls]);
 
     // Should handle conferenceCallStateChange after callStateChanged and
     // callDisconnected.
     if (newConferenceState != this._currentConferenceState) {
       this._handleConferenceCallStateChanged(newConferenceState);
     }
 
     this._updateAudioState(aClientId);
@@ -1570,37 +1602,37 @@ TelephonyService.prototype = {
                                 request.callback);
       this._cachedDialRequest = null;
     }
   },
 
   /**
    * Handle call state changes.
    */
-  _handleCallStateChanged: function(aClientId, aCall) {
-    if (DEBUG) debug("handleCallStateChange: " + JSON.stringify(aCall));
+  _handleCallStateChanged: function(aClientId, aCalls) {
+    if (DEBUG) debug("handleCallStateChanged: " + JSON.stringify(aCalls));
 
-    if (aCall.state == nsITelephonyService.CALL_STATE_DIALING) {
+    if (aCalls.some(call => call.state == nsITelephonyService.CALL_STATE_DIALING)) {
       gTelephonyMessenger.notifyNewCall();
     }
 
-    let callInfo = new TelephonyCallInfo(aCall);
-    this._notifyAllListeners("callStateChanged", [callInfo]);
+    let allInfo = aCalls.map(call => new TelephonyCallInfo(call));
+    this._notifyAllListeners("callStateChanged", [allInfo.length, allInfo]);
   },
 
   notifyCdmaCallWaiting: function(aClientId, aCall) {
     // We need to acquire a CPU wake lock to avoid the system falling into
     // the sleep mode when the RIL handles the incoming call.
     this._acquireCallRingWakeLock();
 
     let call = this._currentCalls[aClientId][CDMA_SECOND_CALL_INDEX];
     if (call) {
       // TODO: Bug 977503 - B2G RIL: [CDMA] update callNumber when a waiting
       // call comes after a 3way call.
-      this._handleCallDisconnected(aClientId, call);
+      this._removeCdmaSecondCall(aClientId);
     }
 
     this._cdmaCallWaitingNumber = aCall.number;
 
     this._notifyAllListeners("notifyCdmaCallWaiting", [aClientId,
                                                        aCall.number,
                                                        aCall.numberPresentation,
                                                        aCall.name,
--- a/dom/telephony/ipc/PTelephony.ipdl
+++ b/dom/telephony/ipc/PTelephony.ipdl
@@ -122,17 +122,17 @@ union IPCTelephonyRequest
 
 sync protocol PTelephony {
   manager PContent;
   manages PTelephonyRequest;
 
 child:
   NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError);
 
-  NotifyCallStateChanged(nsTelephonyCallInfo aInfo);
+  NotifyCallStateChanged(nsTelephonyCallInfo[] aAllInfo);
 
   NotifyCdmaCallWaiting(uint32_t aClientId, IPCCdmaWaitingCallData aData);
 
   NotifyConferenceCallStateChanged(uint16_t aCallState);
 
   NotifyConferenceError(nsString aName, nsString aMessage);
 
   NotifySupplementaryService(uint32_t aClientId, int32_t aCallIndex,
--- a/dom/telephony/ipc/TelephonyChild.cpp
+++ b/dom/telephony/ipc/TelephonyChild.cpp
@@ -53,25 +53,30 @@ TelephonyChild::RecvNotifyCallError(cons
 {
   MOZ_ASSERT(mService);
 
   mService->NotifyError(aClientId, aCallIndex, aError);
   return true;
 }
 
 bool
-TelephonyChild::RecvNotifyCallStateChanged(nsITelephonyCallInfo* const& aInfo)
+TelephonyChild::RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo)
 {
-  // Use dont_AddRef here because this instances has already been AddRef-ed in
-  // TelephonyIPCSerializer.h
-  nsCOMPtr<nsITelephonyCallInfo> info = dont_AddRef(aInfo);
+  uint32_t length = aAllInfo.Length();
+  nsTArray<nsCOMPtr<nsITelephonyCallInfo>> results;
+  for (uint32_t i = 0; i < length; ++i) {
+    // Use dont_AddRef here because this instance has already been AddRef-ed in
+    // TelephonyIPCSerializer.h
+    nsCOMPtr<nsITelephonyCallInfo> info = dont_AddRef(aAllInfo[i]);
+    results.AppendElement(info);
+  }
 
   MOZ_ASSERT(mService);
 
-  mService->CallStateChanged(aInfo);
+  mService->CallStateChanged(length, const_cast<nsITelephonyCallInfo**>(aAllInfo.Elements()));
 
   return true;
 }
 
 bool
 TelephonyChild::RecvNotifyCdmaCallWaiting(const uint32_t& aClientId,
                                           const IPCCdmaWaitingCallData& aData)
 {
--- a/dom/telephony/ipc/TelephonyChild.h
+++ b/dom/telephony/ipc/TelephonyChild.h
@@ -33,17 +33,17 @@ protected:
   virtual bool
   DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) override;
 
   virtual bool
   RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
                       const nsString& aError) override;
 
   virtual bool
-  RecvNotifyCallStateChanged(nsITelephonyCallInfo* const& aInfo) override;
+  RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo) override;
 
   virtual bool
   RecvNotifyCdmaCallWaiting(const uint32_t& aClientId,
                             const IPCCdmaWaitingCallData& aData) override;
 
   virtual bool
   RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) override;
 
--- a/dom/telephony/ipc/TelephonyIPCService.cpp
+++ b/dom/telephony/ipc/TelephonyIPCService.cpp
@@ -362,20 +362,20 @@ TelephonyIPCService::SetSpeakerEnabled(b
 
   mPTelephonyChild->SendSetSpeakerEnabled(aEnabled);
   return NS_OK;
 }
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
-TelephonyIPCService::CallStateChanged(nsITelephonyCallInfo* aInfo)
+TelephonyIPCService::CallStateChanged(uint32_t aLength, nsITelephonyCallInfo** aAllInfo)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
-    mListeners[i]->CallStateChanged(aInfo);
+    mListeners[i]->CallStateChanged(aLength, aAllInfo);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyIPCService::ConferenceCallStateChanged(uint16_t aCallState)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
--- a/dom/telephony/ipc/TelephonyParent.cpp
+++ b/dom/telephony/ipc/TelephonyParent.cpp
@@ -268,21 +268,26 @@ TelephonyParent::RecvSetSpeakerEnabled(c
 
   service->SetSpeakerEnabled(aEnabled);
   return true;
 }
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
-TelephonyParent::CallStateChanged(nsITelephonyCallInfo* aInfo)
+TelephonyParent::CallStateChanged(uint32_t aLength, nsITelephonyCallInfo** aAllInfo)
 {
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
 
-  return SendNotifyCallStateChanged(aInfo) ? NS_OK : NS_ERROR_FAILURE;
+  nsTArray<nsITelephonyCallInfo*> allInfo;
+  for (uint32_t i = 0; i < aLength; i++) {
+    allInfo.AppendElement(aAllInfo[i]);
+  }
+
+  return SendNotifyCallStateChanged(allInfo) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 TelephonyParent::ConferenceCallStateChanged(uint16_t aCallState)
 {
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
 
   return SendNotifyConferenceCallStateChanged(aCallState) ? NS_OK
@@ -376,17 +381,17 @@ TelephonyRequestParent::SendResponse(con
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
 
   return Send__delete__(this, aResponse) ? NS_OK : NS_ERROR_FAILURE;
 }
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
-TelephonyRequestParent::CallStateChanged(nsITelephonyCallInfo* aInfo)
+TelephonyRequestParent::CallStateChanged(uint32_t aLength, nsITelephonyCallInfo** aAllInfo)
 {
   MOZ_CRASH("Not a TelephonyParent!");
 }
 
 NS_IMETHODIMP
 TelephonyRequestParent::ConferenceCallStateChanged(uint16_t aCallState)
 {
   MOZ_CRASH("Not a TelephonyParent!");
--- a/dom/telephony/nsITelephonyService.idl
+++ b/dom/telephony/nsITelephonyService.idl
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIMobileCallForwardingOptions;
 interface nsITelephonyCallInfo;
 
-[scriptable, uuid(3cdc0b98-0c5f-489d-9190-083d137f40da)]
+[scriptable, uuid(37fb45bb-ae10-4cfd-b24e-d656a9787a0a)]
 interface nsITelephonyListener : nsISupports
 {
   /**
    * Called when enumeration asked by nsITelephonyService::enumerateCalls
    * is completed.
    */
   void enumerateCallStateComplete();
 
@@ -21,17 +21,18 @@ interface nsITelephonyListener : nsISupp
    * telephony call state (nsITelephonyService::enumerateCalls). This is
    * called once per call that is currently managed by the RIL.
    */
   void enumerateCallState(in nsITelephonyCallInfo info);
 
   /**
    * Notified when a telephony call changes state.
    */
-  void callStateChanged(in nsITelephonyCallInfo info);
+  void callStateChanged(in unsigned long length,
+                        [array, size_is(length)] in nsITelephonyCallInfo allInfo);
 
   /**
    * Called when participants of a conference call have been updated, and the
    * conference call state changes.
    *
    * @param callState
    *        Possible values are: nsITelephonyService::CALL_STATE_UNKNOWN,
    *        nsITelephonyService::CALL_STATE_HELD,
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -386,24 +386,32 @@ var WifiManager = (function() {
     callback(true);
   }
 
   function getHttpProxyNetwork(network) {
     if (!network)
       return null;
 
     let networkKey = getNetworkKey(network);
-    return ((networkKey in httpProxyConfig) ? httpProxyConfig : null);
+    return httpProxyConfig[networkKey];
   }
 
   function setHttpProxy(network) {
     if (!network)
       return;
 
-    gNetworkService.setNetworkProxy(network);
+    // If we got here, arg network must be the currentNetwork, so we just update
+    // WifiNetworkInterface correspondingly and notify NetworkManager.
+    WifiNetworkInterface.httpProxyHost = network.httpProxyHost;
+    WifiNetworkInterface.httpProxyPort = network.httpProxyPort;
+
+    if (WifiNetworkInterface.state ==
+        Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED) {
+      gNetworkManager.updateNetworkInterface(WifiNetworkInterface);
+    }
   }
 
   var staticIpConfig = Object.create(null);
   function setStaticIpMode(network, info, callback) {
     let setNetworkKey = getNetworkKey(network);
     let curNetworkKey = null;
     let currentNetwork = Object.create(null);
     currentNetwork.netId = manager.connectionInfo.id;
@@ -2198,21 +2206,16 @@ function WifiWorker() {
         // password. For now, we require user interaction to break the loop and
         // select a better network!
         if (self._needToEnableNetworks) {
           self._enableAllNetworks();
           self._needToEnableNetworks = false;
         }
 
         var _oncompleted = function() {
-          // Update http proxy when connected to network.
-          let netConnect = WifiManager.getHttpProxyNetwork(self.currentNetwork);
-          if (netConnect)
-            WifiManager.setHttpProxy(netConnect);
-
           // The full authentication process is completed, reset the count.
           WifiManager.authenticationFailuresCount = 0;
           WifiManager.loopDetectionCount = 0;
           self._startConnectionInfoTimer();
           self._fireEvent("onassociate", { network: netToDOM(self.currentNetwork) });
         };
 
         // We get the ASSOCIATED event when we've associated but not connected, so
@@ -2247,32 +2250,16 @@ function WifiWorker() {
               this.prevState === "UNINITIALIZED")) {
           // When in disconnected mode, need to turn on wifi power saving mode.
           WifiManager.setPowerSavingMode(true);
           return;
         }
 
         self._fireEvent("ondisconnect", {network: netToDOM(self.currentNetwork)});
 
-        // When disconnected, clear the http proxy setting if it exists.
-        // Temporarily set http proxy to empty and restore user setting after setHttpProxy.
-        let netDisconnect = WifiManager.getHttpProxyNetwork(self.currentNetwork);
-        if (netDisconnect) {
-          let prehttpProxyHostSetting = netDisconnect.httpProxyHost;
-          let prehttpProxyPortSetting = netDisconnect.httpProxyPort;
-
-          netDisconnect.httpProxyHost = "";
-          netDisconnect.httpProxyPort = 0;
-
-          WifiManager.setHttpProxy(netDisconnect);
-
-          netDisconnect.httpProxyHost = prehttpProxyHostSetting;
-          netDisconnect.httpProxyPort = prehttpProxyPortSetting;
-        }
-
         self.currentNetwork = null;
         self.ipAddress = "";
 
         if (self._turnOnBackgroundScan) {
           self._turnOnBackgroundScan = false;
           WifiManager.setBackgroundScan("ON", function(did_something, ok) {
             WifiManager.reassociate(function() {});
           });
@@ -2323,16 +2310,23 @@ function WifiWorker() {
       return;
     }
 
     let maskLength =
       netHelpers.getMaskLength(netHelpers.stringToIP(this.info.mask_str));
     if (!maskLength) {
       maskLength = 32; // max prefix for IPv4.
     }
+
+    let netConnect = WifiManager.getHttpProxyNetwork(self.currentNetwork);
+    if (netConnect) {
+      WifiNetworkInterface.httpProxyHost = netConnect.httpProxyHost;
+      WifiNetworkInterface.httpProxyPort = netConnect.httpProxyPort;
+    }
+
     WifiNetworkInterface.state =
       Ci.nsINetworkInterface.NETWORK_STATE_CONNECTED;
     WifiNetworkInterface.ips = [this.info.ipaddr_str];
     WifiNetworkInterface.prefixLengths = [maskLength];
     WifiNetworkInterface.gateways = [this.info.gateway_str];
     if (typeof this.info.dns1_str == "string" &&
         this.info.dns1_str.length) {
       WifiNetworkInterface.dnses.push(this.info.dns1_str);