Backed out 4 changesets (bug 887690) for suspicion of causing frequent mochitest-2 failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 12 Aug 2013 19:13:38 -0400
changeset 142348 c146d402a55fbaceda6313b5cd45b3a44bf5878e
parent 142347 44eb4e651e916856bd6030e12deebd646959d1e6
child 142349 86b6480829c866a7b217a9dc8a92e13835273d36
child 142391 8c240c67f76c85818e2d127ca1093d7829a85bda
child 142395 fd676bc1011c36ac006b0df7c27a4f116a8f9c74
push id32372
push userryanvm@gmail.com
push dateTue, 13 Aug 2013 01:59:20 +0000
treeherdermozilla-inbound@86b6480829c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs887690
milestone26.0a1
backs out106ae6eee902bd60e52977d905b13c356d7fd08f
e2c72cb029f444e58c1adc448fb0e48848102f13
9eea090ed6f737b873eae90bf409d3d4fa35a6a3
1defeb691f5c04302dea8539ea7675b7d05c5e7a
first release with
nightly linux32
c146d402a55f / 26.0a1 / 20130813030205 / files
nightly linux64
c146d402a55f / 26.0a1 / 20130813030205 / files
nightly mac
c146d402a55f / 26.0a1 / 20130813030205 / files
nightly win32
c146d402a55f / 26.0a1 / 20130813030205 / files
nightly win64
c146d402a55f / 26.0a1 / 20130813030205 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 4 changesets (bug 887690) for suspicion of causing frequent mochitest-2 failures. Backed out changeset 106ae6eee902 (bug 887690) Backed out changeset e2c72cb029f4 (bug 887690) Backed out changeset 9eea090ed6f7 (bug 887690) Backed out changeset 1defeb691f5c (bug 887690)
content/base/src/nsGkAtomList.h
dom/network/interfaces/moz.build
dom/network/interfaces/nsIDOMMobileConnection.idl
dom/network/interfaces/nsIDOMMozEmergencyCbModeEvent.idl
dom/network/interfaces/nsIMobileConnectionProvider.idl
dom/network/src/MobileConnection.cpp
dom/system/gonk/RILContentHelper.js
dom/system/gonk/RadioInterfaceLayer.js
dom/system/gonk/ril_worker.js
dom/system/gonk/tests/test_ril_worker_ecm.js
dom/system/gonk/tests/xpcshell.ini
dom/webidl/MozEmergencyCbModeEvent.webidl
dom/webidl/WebIDL.mk
js/xpconnect/src/event_impl_gen.conf.in
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -701,17 +701,16 @@ GK_ATOM(ondragend, "ondragend")
 GK_ATOM(ondragenter, "ondragenter")
 GK_ATOM(ondragexit, "ondragexit")
 GK_ATOM(ondraggesture, "ondraggesture")
 GK_ATOM(ondragleave, "ondragleave")
 GK_ATOM(ondragover, "ondragover")
 GK_ATOM(ondragstart, "ondragstart")
 GK_ATOM(ondrop, "ondrop")
 GK_ATOM(onenabled, "onenabled")
-GK_ATOM(onemergencycbmodechange, "onemergencycbmodechange")
 GK_ATOM(onerror, "onerror")
 GK_ATOM(onfailed, "onfailed")
 GK_ATOM(onfocus, "onfocus")
 GK_ATOM(onget, "onget")
 GK_ATOM(onhashchange, "onhashchange")
 GK_ATOM(onheadphoneschange, "onheadphoneschange")
 GK_ATOM(onheld, "onheld")
 GK_ATOM(onhfpstatuschanged, "onhfpstatuschanged")
--- a/dom/network/interfaces/moz.build
+++ b/dom/network/interfaces/moz.build
@@ -16,17 +16,16 @@ XPIDL_SOURCES += [
     'nsITCPSocketChild.idl',
     'nsITCPSocketParent.idl',
 ]
 
 if CONFIG['MOZ_B2G_RIL']:
     XPIDL_SOURCES += [
         'nsIDOMCFStateChangeEvent.idl',
         'nsIDOMMobileConnection.idl',
-        'nsIDOMMozEmergencyCbModeEvent.idl',
         'nsIDOMNetworkStats.idl',
         'nsIDOMNetworkStatsManager.idl',
         'nsIMobileConnectionProvider.idl',
     ]
 
 XPIDL_MODULE = 'dom_network'
 
 XPIDL_FLAGS += [
--- a/dom/network/interfaces/nsIDOMMobileConnection.idl
+++ b/dom/network/interfaces/nsIDOMMobileConnection.idl
@@ -6,17 +6,17 @@
 
 interface nsIDOMEventListener;
 interface nsIDOMDOMRequest;
 interface nsIDOMMozMobileConnectionInfo;
 interface nsIDOMMozMobileNetworkInfo;
 interface nsIDOMMozMobileCellInfo;
 interface nsIDOMMozMobileCFInfo;
 
-[scriptable, builtinclass, uuid(35fbab20-ee07-454d-943d-090a9378f5cf)]
+[scriptable, builtinclass, uuid(ae82dac0-d1a0-11e2-8b8b-0800200c9a66)]
 interface nsIDOMMozMobileConnection : nsIDOMEventTarget
 {
   const long ICC_SERVICE_CLASS_VOICE = (1 << 0);
   const long ICC_SERVICE_CLASS_DATA = (1 << 1);
   const long ICC_SERVICE_CLASS_FAX = (1 << 2);
   const long ICC_SERVICE_CLASS_SMS = (1 << 3);
   const long ICC_SERVICE_CLASS_DATA_SYNC = (1 << 4);
   const long ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5);
@@ -263,17 +263,17 @@ interface nsIDOMMozMobileConnection : ns
   nsIDOMDOMRequest getCallWaitingOption();
 
   /**
    * Enables or disables the presentation of the calling line identity (CLI) to
    * the called party when originating a call.
    *
    * @param clirMode
    *        Is one of the CLIR_* constants.
-   *
+   *        
    * If successful, the request's onsuccess will be called.
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    */
   nsIDOMDOMRequest setCallingLineIdRestriction(in unsigned short clirMode);
 
   /**
@@ -285,26 +285,16 @@ interface nsIDOMMozMobileConnection : ns
    *
    * Otherwise, the request's onerror will be called, and the request's error
    * will be either 'RadioNotAvailable', 'RequestNotSupported',
    * or 'GenericFailure'.
    */
   nsIDOMDOMRequest getCallingLineIdRestriction();
 
   /**
-   * Exit emergency callback mode.
-   *
-   * If successful, the request's onsuccess will be called.
-   *
-   * Otherwise, the request's onerror will be called, and the request's error
-   * will be either 'RequestNotSupported'  or 'GenericFailure'.
-   */
-  nsIDOMDOMRequest exitEmergencyCbMode();
-
-  /**
    * The 'voicechange' event is notified whenever the voice connection object
    * changes.
    */
   [implicit_jscontext] attribute jsval onvoicechange;
 
   /**
    * The 'datachange' event is notified whenever the data connection object
    * changes values.
@@ -323,22 +313,16 @@ interface nsIDOMMozMobileConnection : ns
    */
   [implicit_jscontext] attribute jsval ondataerror;
 
   /**
    * The 'oncfstatechange' event is notified whenever the call forwarding
    * state changes.
    */
   [implicit_jscontext] attribute jsval oncfstatechange;
-
-  /**
-   * The 'emergencycbmodechange' event is notified whenever the emergency
-   * callback mode changes.
-   */
-  [implicit_jscontext] attribute jsval onemergencycbmodechange;
 };
 
 [scriptable, uuid(49706beb-a160-40b7-b745-50f62e389a2c)]
 interface nsIDOMMozMobileConnectionInfo : nsISupports
 {
   /**
    * State of the connection.
    *
deleted file mode 100644
--- a/dom/network/interfaces/nsIDOMMozEmergencyCbModeEvent.idl
+++ /dev/null
@@ -1,31 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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 "nsIDOMEvent.idl"
-
-[scriptable, builtinclass, uuid(15cc1010-f051-11e2-945c-60a44c237d2b)]
-interface nsIDOMMozEmergencyCbModeEvent : nsIDOMEvent
-{
-  /**
-   * Whether the mode is activated.
-   */
-  readonly attribute boolean active;
-
-  /**
-   * Automatically exit the mode after the timeoutMs ms.
-   */
-  readonly attribute unsigned long timeoutMs;
-
-  [noscript] void initMozEmergencyCbModeEvent(in DOMString aType,
-                                              in boolean aCanBubble,
-                                              in boolean aCancelable,
-                                              in boolean aActive,
-                                              in unsigned long aTimeoutMs);
-};
-
-dictionary MozEmergencyCbModeEventInit : EventInit
-{
-  boolean active;
-  unsigned long timeoutMs;
-};
--- a/dom/network/interfaces/nsIMobileConnectionProvider.idl
+++ b/dom/network/interfaces/nsIMobileConnectionProvider.idl
@@ -5,39 +5,37 @@
 #include "nsISupports.idl"
 
 interface nsIDOMDOMRequest;
 interface nsIDOMMozMobileCFInfo;
 interface nsIDOMMozMobileConnectionInfo;
 interface nsIDOMMozMobileNetworkInfo;
 interface nsIDOMWindow;
 
-[scriptable, uuid(7da2d9f6-eba1-4339-bde1-dc6732d42cdf)]
+[scriptable, uuid(74361840-c913-11e2-8b8b-0800200c9a66)]
 interface nsIMobileConnectionListener : nsISupports
 {
   void notifyVoiceChanged();
   void notifyDataChanged();
   void notifyUssdReceived(in DOMString message,
                           in boolean sessionEnded);
   void notifyDataError(in DOMString message);
   void notifyCFStateChange(in boolean success,
                            in unsigned short action,
                            in unsigned short reason,
                            in DOMString number,
                            in unsigned short timeSeconds,
                            in unsigned short serviceClass);
-  void notifyEmergencyCbModeChanged(in boolean active,
-                                    in unsigned long timeoutMs);
 };
 
 /**
  * XPCOM component (in the content process) that provides the mobile
  * network information.
  */
-[scriptable, uuid(a16681a5-a7f1-4340-a478-e0326a49e988)]
+[scriptable, uuid(12705160-d1b6-11e2-8b8b-0800200c9a66)]
 interface nsIMobileConnectionProvider : nsISupports
 {
   /**
    * Called when a content process registers receiving unsolicited messages from
    * RadioInterfaceLayer in the chrome process. Only a content process that has
    * the 'mobileconnection' permission is allowed to register.
    */
   void registerMobileConnectionMsg(in nsIMobileConnectionListener listener);
@@ -70,11 +68,9 @@ interface nsIMobileConnectionProvider : 
 
   nsIDOMDOMRequest setCallWaitingOption(in nsIDOMWindow   window,
                                         in bool enabled);
   nsIDOMDOMRequest getCallWaitingOption(in nsIDOMWindow   window);
 
   nsIDOMDOMRequest setCallingLineIdRestriction(in nsIDOMWindow   window,
                                                in unsigned short clirMode);
   nsIDOMDOMRequest getCallingLineIdRestriction(in nsIDOMWindow   window);
-
-  nsIDOMDOMRequest exitEmergencyCbMode(in nsIDOMWindow window);
 };
--- a/dom/network/src/MobileConnection.cpp
+++ b/dom/network/src/MobileConnection.cpp
@@ -1,23 +1,21 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "MobileConnection.h"
-
+#include "nsIDOMDOMRequest.h"
+#include "nsIDOMClassInfo.h"
+#include "nsDOMEvent.h"
+#include "nsIDOMUSSDReceivedEvent.h"
+#include "nsIDOMDataErrorEvent.h"
+#include "nsIDOMCFStateChangeEvent.h"
 #include "GeneratedEvents.h"
 #include "mozilla/Preferences.h"
-#include "nsDOMEvent.h"
-#include "nsIDOMCFStateChangeEvent.h"
-#include "nsIDOMClassInfo.h"
-#include "nsIDOMDOMRequest.h"
-#include "nsIDOMDataErrorEvent.h"
-#include "nsIDOMMozEmergencyCbModeEvent.h"
-#include "nsIDOMUSSDReceivedEvent.h"
 #include "nsIPermissionManager.h"
 
 #include "nsContentUtils.h"
 #include "nsJSUtils.h"
 #include "nsJSON.h"
 #include "jsapi.h"
 #include "mozilla/Services.h"
 
@@ -71,17 +69,16 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMEve
 NS_IMPL_ADDREF_INHERITED(MobileConnection, nsDOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(MobileConnection, nsDOMEventTargetHelper)
 
 NS_IMPL_EVENT_HANDLER(MobileConnection, voicechange)
 NS_IMPL_EVENT_HANDLER(MobileConnection, datachange)
 NS_IMPL_EVENT_HANDLER(MobileConnection, ussdreceived)
 NS_IMPL_EVENT_HANDLER(MobileConnection, dataerror)
 NS_IMPL_EVENT_HANDLER(MobileConnection, cfstatechange)
-NS_IMPL_EVENT_HANDLER(MobileConnection, emergencycbmodechange)
 
 MobileConnection::MobileConnection()
 {
   mProvider = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
   mWindow = nullptr;
 
   // Not being able to acquire the provider isn't fatal since we check
   // for it explicitly below.
@@ -436,32 +433,16 @@ MobileConnection::SetCallingLineIdRestri
 
   if (!mProvider) {
     return NS_ERROR_FAILURE;
   }
 
   return mProvider->SetCallingLineIdRestriction(GetOwner(), aClirMode, aRequest);
 }
 
-NS_IMETHODIMP
-MobileConnection::ExitEmergencyCbMode(nsIDOMDOMRequest** aRequest)
-{
-  *aRequest = nullptr;
-
-  if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
-  }
-
-  if (!mProvider) {
-    return NS_ERROR_FAILURE;
-  }
-
-  return mProvider->ExitEmergencyCbMode(GetOwner(), aRequest);
-}
-
 // nsIMobileConnectionListener
 
 NS_IMETHODIMP
 MobileConnection::NotifyVoiceChanged()
 {
   if (!CheckPermission("mobileconnection")) {
     return NS_OK;
   }
@@ -536,30 +517,8 @@ MobileConnection::NotifyCFStateChange(bo
   nsresult rv = ce->InitCFStateChangeEvent(NS_LITERAL_STRING("cfstatechange"),
                                            false, false,
                                            aSuccess, aAction, aReason, aNumber,
                                            aSeconds, aServiceClass);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return DispatchTrustedEvent(ce);
 }
-
-NS_IMETHODIMP
-MobileConnection::NotifyEmergencyCbModeChanged(bool aActive,
-                                               uint32_t aTimeoutMs)
-{
-  if (!CheckPermission("mobileconnection")) {
-    return NS_OK;
-  }
-
-  nsCOMPtr<nsIDOMEvent> event;
-  NS_NewDOMMozEmergencyCbModeEvent(getter_AddRefs(event), this, nullptr,
-                                   nullptr);
-  MOZ_ASSERT(event);
-
-  nsCOMPtr<nsIDOMMozEmergencyCbModeEvent> ce = do_QueryInterface(event);
-  nsresult rv = ce->InitMozEmergencyCbModeEvent(
-      NS_LITERAL_STRING("emergencycbmodechange"), false, false,
-      aActive, aTimeoutMs);
-  NS_ENSURE_SUCCESS(rv, rv);
-
-  return DispatchTrustedEvent(ce);
-}
--- a/dom/system/gonk/RILContentHelper.js
+++ b/dom/system/gonk/RILContentHelper.js
@@ -70,17 +70,16 @@ const RIL_IPC_MSG_NAMES = [
   "RIL:VoiceInfoChanged",
   "RIL:DataInfoChanged",
   "RIL:EnumerateCalls",
   "RIL:GetAvailableNetworks",
   "RIL:NetworkSelectionModeChanged",
   "RIL:SelectNetwork",
   "RIL:SelectNetworkAuto",
   "RIL:CallStateChanged",
-  "RIL:EmergencyCbModeChanged",
   "RIL:VoicemailNotification",
   "RIL:VoicemailInfoChanged",
   "RIL:CallError",
   "RIL:SuppSvcNotification",
   "RIL:CardLockResult",
   "RIL:CardLockRetryCount",
   "RIL:USSDReceived",
   "RIL:SendMMI:Return:OK",
@@ -102,18 +101,17 @@ const RIL_IPC_MSG_NAMES = [
   "RIL:CfStateChanged",
   "RIL:IccOpenChannel",
   "RIL:IccCloseChannel",
   "RIL:IccExchangeAPDU",
   "RIL:ReadIccContacts",
   "RIL:UpdateIccContact",
   "RIL:SetRoamingPreference",
   "RIL:GetRoamingPreference",
-  "RIL:CdmaCallWaiting",
-  "RIL:ExitEmergencyCbMode"
+  "RIL:CdmaCallWaiting"
 ];
 
 XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
                                    "@mozilla.org/childprocessmessagemanager;1",
                                    "nsISyncMessageSender");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gUUIDGenerator",
                                    "@mozilla.org/uuid-generator;1",
@@ -1135,34 +1133,16 @@ RILContentHelper.prototype = {
         requestId: requestId,
         clirMode: clirMode
       }
     });
 
     return request;
   },
 
-  exitEmergencyCbMode: function exitEmergencyCbMode(window) {
-    if (window == null) {
-      throw Components.Exception("Can't get window object",
-                                  Cr.NS_ERROR_UNEXPECTED);
-    }
-    let request = Services.DOMRequest.createRequest(window);
-    let requestId = this.getRequestId(request);
-
-    cpmm.sendAsyncMessage("RIL:ExitEmergencyCbMode", {
-      clientId: 0,
-      data: {
-        requestId: requestId,
-      }
-    });
-
-    return request;
-  },
-
   _mobileConnectionListeners: null,
   _telephonyListeners: null,
   _cellBroadcastListeners: null,
   _voicemailListeners: null,
   _iccListeners: null,
   _enumerateTelephonyCallbacks: null,
 
   voicemailStatus: null,
@@ -1625,25 +1605,16 @@ RILContentHelper.prototype = {
         this.handleSimpleRequest(msg.json.requestId, msg.json.errorMsg,
                                  msg.json.mode);
         break;
       case "RIL:CdmaCallWaiting":
         this._deliverEvent("_telephonyListeners",
                            "notifyCdmaCallWaiting",
                            [msg.json.data]);
         break;
-      case "RIL:ExitEmergencyCbMode":
-        this.handleExitEmergencyCbMode(msg.json);
-        break;
-      case "RIL:EmergencyCbModeChanged":
-        let data = msg.json.data;
-        this._deliverEvent("_mobileConnectionListeners",
-                           "notifyEmergencyCbModeChanged",
-                           [data.active, data.timeoutMs]);
-        break;
     }
   },
 
   handleEnumerateCalls: function handleEnumerateCalls(calls) {
     debug("handleEnumerateCalls: " + JSON.stringify(calls));
     let callback = this._enumerateTelephonyCallbacks.shift();
     if (!calls.length) {
       callback.enumerateCallStateComplete();
@@ -1819,30 +1790,16 @@ RILContentHelper.prototype = {
       this.fireRequestError(message.requestId, message.errorMsg);
       return;
     }
 
     let status = new DOMCLIRStatus(message);
     this.fireRequestSuccess(message.requestId, status);
   },
 
-  handleExitEmergencyCbMode: function handleExitEmergencyCbMode(message) {
-    let requestId = message.requestId;
-    let request = this.takeRequest(requestId);
-    if (!request) {
-      return;
-    }
-
-    if (!message.success) {
-      Services.DOMRequest.fireError(request, message.errorMsg);
-      return;
-    }
-    Services.DOMRequest.fireSuccess(request, null);
-  },
-
   handleSendCancelMMI: function handleSendCancelMMI(message) {
     debug("handleSendCancelMMI " + JSON.stringify(message));
     let request = this.takeRequest(message.requestId);
     if (!request) {
       return;
     }
 
     let success = message.success;
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -105,18 +105,17 @@ const RIL_IPC_MOBILECONNECTION_MSG_NAMES
   "RIL:GetCallForwardingOption",
   "RIL:SetCallBarringOption",
   "RIL:GetCallBarringOption",
   "RIL:SetCallWaitingOption",
   "RIL:GetCallWaitingOption",
   "RIL:SetCallingLineIdRestriction",
   "RIL:GetCallingLineIdRestriction",
   "RIL:SetRoamingPreference",
-  "RIL:GetRoamingPreference",
-  "RIL:ExitEmergencyCbMode"
+  "RIL:GetRoamingPreference"
 ];
 
 const RIL_IPC_ICCMANAGER_MSG_NAMES = [
   "RIL:SendStkResponse",
   "RIL:SendStkMenuSelection",
   "RIL:SendStkTimerExpiration",
   "RIL:SendStkEventDownload",
   "RIL:GetCardLockState",
@@ -908,20 +907,16 @@ RadioInterface.prototype = {
       case "RIL:SetCallingLineIdRestriction":
         gMessageManager.saveRequestTarget(msg);
         this.setCallingLineIdRestriction(msg.json.data);
         break;
       case "RIL:GetCallingLineIdRestriction":
         gMessageManager.saveRequestTarget(msg);
         this.getCallingLineIdRestriction(msg.json.data);
         break;
-      case "RIL:ExitEmergencyCbMode":
-        gMessageManager.saveRequestTarget(msg);
-        this.exitEmergencyCbMode(msg.json.data);
-        break;
       case "RIL:GetVoicemailInfo":
         // This message is sync.
         return this.voicemailInfo;
       case "RIL:SetRoamingPreference":
         gMessageManager.saveRequestTarget(msg);
         this.setRoamingPreference(msg.json.data);
         break;
       case "RIL:GetRoamingPreference":
@@ -972,19 +967,16 @@ RadioInterface.prototype = {
         this.handleEnumerateCalls(message);
         break;
       case "callError":
         this.handleCallError(message);
         break;
       case "suppSvcNotification":
         this.handleSuppSvcNotification(message);
         break;
-      case "emergencyCbModeChange":
-        this.handleEmergencyCbModeChange(message);
-        break;
       case "iccOpenChannel":
         this.handleIccOpenChannel(message);
         break;
       case "iccCloseChannel":
         this.handleIccCloseChannel(message);
         break;
       case "iccExchangeAPDU":
         this.handleIccExchangeAPDU(message);
@@ -1135,19 +1127,16 @@ RadioInterface.prototype = {
         lock.set("ril.radio.disabled", !message.on, null, null);
         break;
       case "setRoamingPreference":
         this.handleSetRoamingPreference(message);
         break;
       case "queryRoamingPreference":
         this.handleQueryRoamingPreference(message);
         break;
-      case "exitEmergencyCbMode":
-        this.handleExitEmergencyCbMode(message);
-        break;
       default:
         throw new Error("Don't know about this message type: " +
                         message.rilMessageType);
     }
   },
 
   getMsisdn: function getMsisdn() {
     let iccInfo = this.rilContext.iccInfo;
@@ -1854,25 +1843,16 @@ RadioInterface.prototype = {
    * Handle "automatic" network selection request.
    */
   handleSelectNetworkAuto: function handleSelectNetworkAuto(message) {
     if (DEBUG) this.debug("handleSelectNetworkAuto: " + JSON.stringify(message));
     gMessageManager.sendRequestResults("RIL:SelectNetworkAuto", message);
   },
 
   /**
-   * Handle emergency callback mode change.
-   */
-  handleEmergencyCbModeChange: function handleEmergencyCbModeChange(message) {
-    if (DEBUG) this.debug("handleEmergencyCbModeChange: " + JSON.stringify(message));
-    gMessageManager.sendMobileConnectionMessage("RIL:EmergencyCbModeChanged",
-                                                this.clientId, message);
-  },
-
-  /**
    * Handle call error.
    */
   handleCallError: function handleCallError(message) {
     gMessageManager.sendTelephonyMessage("RIL:CallError",
                                          this.clientId, message);
   },
 
   /**
@@ -2447,21 +2427,16 @@ RadioInterface.prototype = {
     gMessageManager.sendRequestResults("RIL:SetRoamingPreference", message);
   },
 
   handleQueryRoamingPreference: function handleQueryRoamingPreference(message) {
     if (DEBUG) this.debug("handleQueryRoamingPreference: " + JSON.stringify(message));
     gMessageManager.sendRequestResults("RIL:GetRoamingPreference", message);
   },
 
-  handleExitEmergencyCbMode: function handleExitEmergencyCbMode(message) {
-    if (DEBUG) this.debug("handleExitEmergencyCbMode: " + JSON.stringify(message));
-    gMessageManager.sendRequestResults("RIL:ExitEmergencyCbMode", message);
-  },
-
   // nsIObserver
 
   observe: function observe(subject, topic, data) {
     switch (topic) {
       case kSysMsgListenerReadyObserverTopic:
         Services.obs.removeObserver(this, kSysMsgListenerReadyObserverTopic);
         this._sysMsgListenerReady = true;
         this._ensureRadioState();
@@ -2853,24 +2828,16 @@ RadioInterface.prototype = {
   },
 
   setRoamingPreference: function setRoamingPreference(message) {
     if (DEBUG) this.debug("setRoamingPreference: " + JSON.stringify(message));
     message.rilMessageType = "setRoamingPreference";
     this.worker.postMessage(message);
   },
 
-  exitEmergencyCbMode: function exitEmergencyCbMode(message) {
-    if (DEBUG) {
-      this.debug("exitEmergencyCbMode: " + JSON.stringify(message));
-    }
-    message.rilMessageType = "exitEmergencyCbMode";
-    this.worker.postMessage(message);
-  },
-
   get microphoneMuted() {
     return gAudioManager.microphoneMuted;
   },
   set microphoneMuted(value) {
     if (value == this.microphoneMuted) {
       return;
     }
     gAudioManager.microphoneMuted = value;
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -57,19 +57,16 @@ const UINT8_SIZE  = 1;
 const UINT16_SIZE = 2;
 const UINT32_SIZE = 4;
 const PARCEL_SIZE_SIZE = UINT32_SIZE;
 
 const PDU_HEX_OCTET_SIZE = 4;
 
 const DEFAULT_EMERGENCY_NUMBERS = ["112", "911"];
 
-// Timeout value for emergency callback mode.
-const EMERGENCY_CB_MODE_TIMEOUT_MS = 300000;  // 5 mins = 300000 ms.
-
 const ICC_MAX_LINEAR_FIXED_RECORDS = 0xfe;
 
 // MMI match groups
 const MMI_MATCH_GROUP_FULL_MMI = 1;
 const MMI_MATCH_GROUP_MMI_PROCEDURE = 2;
 const MMI_MATCH_GROUP_SERVICE_CODE = 3;
 const MMI_MATCH_GROUP_SIA = 5;
 const MMI_MATCH_GROUP_SIB = 7;
@@ -785,21 +782,16 @@ let RIL = {
     this._isInitialRadioState = true;
 
     /**
      * True if we are on CDMA network.
      */
     this._isCdma = false;
 
     /**
-     * True if we are in emergency callback mode.
-     */
-    this._isInEmergencyCbMode = false;
-
-    /**
      * Set when radio is ready but radio tech is unknown. That is, we are
      * waiting for REQUEST_VOICE_RADIO_TECH
      */
     this._waitingRadioTech = false;
 
     /**
      * ICC status. Keeps a reference of the data response to the
      * getICCStatus request.
@@ -1765,31 +1757,16 @@ let RIL = {
   getDeviceIdentity: function getDeviceIdentity() {
     Buf.simpleRequest(REQUEST_DEVICE_IDENTITY);
   },
 
   getBasebandVersion: function getBasebandVersion() {
     Buf.simpleRequest(REQUEST_BASEBAND_VERSION);
   },
 
-  sendExitEmergencyCbModeRequest: function sendExitEmergencyCbModeRequest(options) {
-    Buf.simpleRequest(REQUEST_EXIT_EMERGENCY_CALLBACK_MODE, options);
-  },
-
-  exitEmergencyCbMode: function exitEmergencyCbMode(options) {
-    // The function could be called by an API from RadioInterfaceLayer or by
-    // ril_worker itself. From ril_worker, we won't pass the parameter
-    // 'options'. In this case, it is marked as internal.
-    if (!options) {
-      options = {internal: true};
-    }
-    this._cancelEmergencyCbModeTimeout();
-    this.sendExitEmergencyCbModeRequest(options);
-  },
-
   /**
    * Cache the request for making an emergency call when radio is off. The
    * request shall include two types of callback functions. 'callback' is
    * called when radio is ready, and 'onerror' is called when turning radio
    * on fails.
    */
   cachedDialRequest : null,
 
@@ -1834,21 +1811,16 @@ let RIL = {
     }
 
     if (this.voiceRegistrationState.emergencyCallsOnly ||
         options.isDialEmergency) {
       onerror(RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_UNOBTAINABLE_NUMBER]);
       return;
     }
 
-    // Exit emergency callback mode when user dial a non-emergency call.
-    if (this._isInEmergencyCbMode) {
-      this.exitEmergencyCbMode();
-    }
-
     options.request = REQUEST_DIAL;
     this.sendDialRequest(options);
   },
 
   dialEmergencyNumber: function dialEmergencyNumber(options, onerror) {
     options.request = RILQUIRKS_REQUEST_USE_DIAL_EMERGENCY_CALL ?
                       REQUEST_DIAL_EMERGENCY_CALL : REQUEST_DIAL;
 
@@ -4008,49 +3980,16 @@ let RIL = {
     }
 
     let message = {rilMessageType: "suppSvcNotification",
                    notification: notification,
                    callIndex: callIndex};
     this.sendChromeMessage(message);
   },
 
-  _cancelEmergencyCbModeTimeout: function _cancelEmergencyCbModeTimeout() {
-    if (this._exitEmergencyCbModeTimeoutID) {
-      clearTimeout(this._exitEmergencyCbModeTimeoutID);
-      this._exitEmergencyCbModeTimeoutID = null;
-    }
-  },
-
-  _handleChangedEmergencyCbMode: function _handleChangedEmergencyCbMode(active) {
-    if (this._isInEmergencyCbMode === active) {
-      return;
-    }
-
-    if (active) {
-      // Start a new timeout event when enter the mode.
-      let ril = this;
-      this._cancelEmergencyCbModeTimeout();
-      this._exitEmergencyCbModeTimeoutID = setTimeout(function() {
-          ril.exitEmergencyCbMode();
-      }, EMERGENCY_CB_MODE_TIMEOUT_MS);
-    } else {
-      // Clear the timeout event when exit mode.
-      this._cancelEmergencyCbModeTimeout();
-    }
-
-    // Keep current mode and write to property.
-    this._isInEmergencyCbMode = active;
-
-    let message = {rilMessageType: "emergencyCbModeChange",
-                   active: active,
-                   timeoutMs: EMERGENCY_CB_MODE_TIMEOUT_MS};
-    this.sendChromeMessage(message);
-  },
-
   _processNetworks: function _processNetworks() {
     let strings = Buf.readStringList();
     let networks = [];
 
     for (let i = 0; i < strings.length; i += 4) {
       let network = {
         longName: strings[i],
         shortName: strings[i + 1],
@@ -5995,27 +5934,17 @@ RIL[REQUEST_DEVICE_IDENTITY] = function 
   let result = 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];
 };
-RIL[REQUEST_EXIT_EMERGENCY_CALLBACK_MODE] = function REQUEST_EXIT_EMERGENCY_CALLBACK_MODE(length, options) {
-  if (options.internal) {
-    return;
-  }
-
-  options.success = (options.rilRequestError === 0);
-  if (!options.success) {
-    options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
-  }
-  this.sendChromeMessage(options);
-};
+RIL[REQUEST_EXIT_EMERGENCY_CALLBACK_MODE] = null;
 RIL[REQUEST_GET_SMSC_ADDRESS] = function REQUEST_GET_SMSC_ADDRESS(length, options) {
   if (options.rilRequestError) {
     return;
   }
 
   this.SMSC = Buf.readString();
 };
 RIL[REQUEST_SET_SMSC_ADDRESS] = null;
@@ -6315,19 +6244,17 @@ RIL[UNSOLICITED_RESPONSE_NEW_BROADCAST_S
     return;
   }
 
   message.rilMessageType = "cellbroadcast-received";
   this.sendChromeMessage(message);
 };
 RIL[UNSOLICITED_CDMA_RUIM_SMS_STORAGE_FULL] = null;
 RIL[UNSOLICITED_RESTRICTED_STATE_CHANGED] = null;
-RIL[UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE] = function UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE() {
-  this._handleChangedEmergencyCbMode(true);
-};
+RIL[UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE] = null;
 RIL[UNSOLICITED_CDMA_CALL_WAITING] = function UNSOLICITED_CDMA_CALL_WAITING(length) {
   let call = {};
   call.number              = Buf.readString();
   call.numberPresentation  = Buf.readUint32();
   call.name                = Buf.readString();
   call.namePresentation    = Buf.readUint32();
   call.isPresent           = Buf.readUint32();
   call.signalType          = Buf.readUint32();
@@ -6336,36 +6263,31 @@ RIL[UNSOLICITED_CDMA_CALL_WAITING] = fun
   this.sendChromeMessage({rilMessageType: "cdmaCallWaiting",
                           number: call.number});
 };
 RIL[UNSOLICITED_CDMA_OTA_PROVISION_STATUS] = null;
 RIL[UNSOLICITED_CDMA_INFO_REC] = null;
 RIL[UNSOLICITED_OEM_HOOK_RAW] = null;
 RIL[UNSOLICITED_RINGBACK_TONE] = null;
 RIL[UNSOLICITED_RESEND_INCALL_MUTE] = null;
-RIL[UNSOLICITED_EXIT_EMERGENCY_CALLBACK_MODE] = function UNSOLICITED_EXIT_EMERGENCY_CALLBACK_MODE() {
-  this._handleChangedEmergencyCbMode(false);
-};
 RIL[UNSOLICITED_RIL_CONNECTED] = function UNSOLICITED_RIL_CONNECTED(length) {
   // Prevent response id collision between UNSOLICITED_RIL_CONNECTED and
   // UNSOLICITED_VOICE_RADIO_TECH_CHANGED for Akami on gingerbread branch.
   if (!length) {
     return;
   }
 
   let version = Buf.readUint32List()[0];
   RILQUIRKS_V5_LEGACY = (version < 5);
   if (DEBUG) {
     debug("Detected RIL version " + version);
     debug("RILQUIRKS_V5_LEGACY is " + RILQUIRKS_V5_LEGACY);
   }
 
   this.initRILState();
-  // Always ensure that we are not in emergency callback mode when init.
-  this.exitEmergencyCbMode();
 };
 
 /**
  * This object exposes the functionality to parse and serialize PDU strings
  *
  * A PDU is a string containing a series of hexadecimally encoded octets
  * or nibble-swapped binary-coded decimals (BCDs). It contains not only the
  * message text but information about the sender, the SMS service center,
deleted file mode 100644
--- a/dom/system/gonk/tests/test_ril_worker_ecm.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-subscriptLoader.loadSubScript("resource://gre/modules/ril_consts.js", this);
-
-function run_test() {
-  run_next_test();
-}
-
-function _getWorker() {
-  let _postedMessage;
-  let _worker = newWorker({
-    postRILMessage: function fakePostRILMessage(data) {
-    },
-    postMessage: function fakePostMessage(message) {
-      _postedMessage = message;
-    }
-  });
-  return {
-    get postedMessage() {
-      return _postedMessage;
-    },
-    get worker() {
-      return _worker;
-    }
-  };
-}
-
-var timeoutCallback = null;
-var timeoutDelayMs = 0;
-var TIMER_ID = 1234;
-
-// No window in xpcshell-test. Create our own timer mechanism.
-
-function setTimeout(callback, timeoutMs) {
-  timeoutCallback = callback;
-  timeoutDelayMs = timeoutMs;
-  do_check_eq(timeoutMs, 300000);  // 5 mins.
-  return TIMER_ID;
-}
-
-function clearTimeout(timeoutId) {
-  do_check_eq(timeoutId, TIMER_ID);
-  timeoutCallback = null;
-}
-
-function fireTimeout() {
-  do_check_neq(timeoutCallback, null);
-  if (timeoutCallback) {
-    timeoutCallback();
-    timeoutCallback = null;
-  }
-}
-
-add_test(function test_enter_emergencyCbMode() {
-  let workerHelper = _getWorker();
-  let worker = workerHelper.worker;
-
-  worker.RIL[UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE]();
-  let postedMessage = workerHelper.postedMessage;
-
-  // Should store the mode.
-  do_check_eq(worker.RIL._isInEmergencyCbMode, true);
-
-  // Should notify change.
-  do_check_eq(postedMessage.rilMessageType, "emergencyCbModeChange");
-  do_check_eq(postedMessage.active, true);
-  do_check_eq(postedMessage.timeoutMs, 300000);
-
-  // Should start timer.
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, TIMER_ID);
-
-  run_next_test();
-});
-
-add_test(function test_exit_emergencyCbMode() {
-  let workerHelper = _getWorker();
-  let worker = workerHelper.worker;
-
-  worker.RIL[UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE]();
-  worker.RIL[UNSOLICITED_EXIT_EMERGENCY_CALLBACK_MODE]();
-  let postedMessage = workerHelper.postedMessage;
-
-  // Should store the mode.
-  do_check_eq(worker.RIL._isInEmergencyCbMode, false);
-
-  // Should notify change.
-  do_check_eq(postedMessage.rilMessageType, "emergencyCbModeChange");
-  do_check_eq(postedMessage.active, false);
-
-  // Should clear timer.
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, null);
-
-  run_next_test();
-});
-
-add_test(function test_request_exit_emergencyCbMode_when_timeout() {
-  let workerHelper = _getWorker();
-  let worker = workerHelper.worker;
-  do_register_cleanup(function() { cleanUp(worker); });
-
-  worker.RIL[UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE]();
-  do_check_eq(worker.RIL._isInEmergencyCbMode, true);
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, TIMER_ID);
-
-  let parcelTypes = [];
-  worker.Buf.newParcel = function(type, options) {
-    parcelTypes.push(type);
-  };
-
-  // Timeout.
-  fireTimeout();
-
-  // Should clear timeout event.
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, null);
-
-  // Check indeed sent out REQUEST_EXIT_EMERGENCY_CALLBACK_MODE.
-  do_check_neq(parcelTypes.indexOf(REQUEST_EXIT_EMERGENCY_CALLBACK_MODE), -1);
-
-  run_next_test();
-});
-
-add_test(function test_request_exit_emergencyCbMode_when_dial() {
-  let workerHelper = _getWorker();
-  let worker = workerHelper.worker;
-
-  worker.RIL[UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE]();
-  do_check_eq(worker.RIL._isInEmergencyCbMode, true);
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, TIMER_ID);
-
-  let parcelTypes = [];
-  worker.Buf.newParcel = function(type, options) {
-    parcelTypes.push(type);
-  };
-
-  // Dial non-emergency call.
-  worker.RIL.dial({number: "0912345678",
-                  isDialEmergency: false});
-
-  // Should clear timeout event.
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, null);
-
-  // Check indeed sent out REQUEST_EXIT_EMERGENCY_CALLBACK_MODE.
-  do_check_neq(parcelTypes.indexOf(REQUEST_EXIT_EMERGENCY_CALLBACK_MODE), -1);
-
-  run_next_test();
-});
-
-add_test(function test_request_exit_emergencyCbMode_explicitly() {
-  let workerHelper = _getWorker();
-  let worker = workerHelper.worker;
-
-  worker.RIL[UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE]();
-  do_check_eq(worker.RIL._isInEmergencyCbMode, true);
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, TIMER_ID);
-
-  let parcelTypes = [];
-  worker.Buf.newParcel = function(type, options) {
-    parcelTypes.push(type);
-  };
-
-  worker.RIL.handleChromeMessage({rilMessageType: "exitEmergencyCbMode"});
-  worker.RIL[REQUEST_EXIT_EMERGENCY_CALLBACK_MODE](1, {
-    rilMessageType: "exitEmergencyCbMode",
-    rilRequestError: ERROR_SUCCESS
-  });
-  let postedMessage = workerHelper.postedMessage;
-
-  // Should clear timeout event.
-  do_check_eq(worker.RIL._exitEmergencyCbModeTimeoutID, null);
-
-  // Check indeed sent out REQUEST_EXIT_EMERGENCY_CALLBACK_MODE.
-  do_check_neq(parcelTypes.indexOf(REQUEST_EXIT_EMERGENCY_CALLBACK_MODE), -1);
-
-  // Send back the response.
-  do_check_eq(postedMessage.rilMessageType, "exitEmergencyCbMode");
-
-  run_next_test();
-});
-
--- a/dom/system/gonk/tests/xpcshell.ini
+++ b/dom/system/gonk/tests/xpcshell.ini
@@ -9,9 +9,8 @@ tail =
 [test_ril_worker_cf.js]
 [test_ril_worker_cellbroadcast_config.js]
 [test_ril_worker_cellbroadcast.js]
 [test_ril_worker_ruim.js]
 [test_ril_worker_cw.js]
 [test_ril_worker_clir.js]
 [test_ril_worker_clip.js]
 [test_ril_worker_ssn.js]
-[test_ril_worker_ecm.js]
deleted file mode 100644
--- a/dom/webidl/MozEmergencyCbModeEvent.webidl
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/.
- */
-
-[Constructor(DOMString type,
-             optional MozEmergencyCbModeEventInit eventInitDict),
- HeaderFile="GeneratedEventClasses.h"]
-interface MozEmergencyCbModeEvent : Event
-{
-  readonly attribute boolean        active;
-  readonly attribute unsigned long  timeoutMs;
-};
-
-dictionary MozEmergencyCbModeEventInit : EventInit
-{
-  boolean active = false;
-  unsigned long timeoutMs = 0;
-};
--- a/dom/webidl/WebIDL.mk
+++ b/dom/webidl/WebIDL.mk
@@ -487,17 +487,16 @@ endif
 
 ifdef MOZ_B2G_RIL
 webidl_files += \
   CallEvent.webidl \
   CFStateChangeEvent.webidl \
   DataErrorEvent.webidl \
   IccCardLockErrorEvent.webidl \
   MozCellBroadcastEvent.webidl \
-  MozEmergencyCbModeEvent.webidl \
   MozVoicemailEvent.webidl \
   MozWifiConnectionInfoEvent.webidl \
   MozWifiStatusChangeEvent.webidl \
   USSDReceivedEvent.webidl \
   $(NULL)
 endif
 
 ifdef MOZ_GAMEPAD
--- a/js/xpconnect/src/event_impl_gen.conf.in
+++ b/js/xpconnect/src/event_impl_gen.conf.in
@@ -30,17 +30,16 @@ simple_events = [
 #ifdef MOZ_B2G_BT
     'BluetoothDeviceEvent',
     'BluetoothStatusChangedEvent',
 #endif
 #ifdef MOZ_B2G_RIL
     'CFStateChangeEvent',
     'DataErrorEvent',
     'IccCardLockErrorEvent',
-    'MozEmergencyCbModeEvent',
     'MozWifiStatusChangeEvent',
     'MozWifiConnectionInfoEvent',
     'MozCellBroadcastEvent',
     'MozVoicemailEvent',
     'USSDReceivedEvent',
 #endif
     'ElementReplaceEvent',
     'MozSmsEvent',