Bug 904588: Convert MozIccManager to WebIDL, r=htsai, r=smaug
authorThomas Zimmermann <tdz@users.sourceforge.net>
Wed, 16 Apr 2014 09:30:28 +0200
changeset 179276 0515ab940ee6916649bfaf862d309e6bc2cca096
parent 179275 ad6b7fe315bdc6491d36b185de5e326b889f9b34
child 179277 8dd9d429da2df2b6a4d27e015521997532f47ce7
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewershtsai, smaug
bugs904588
milestone31.0a1
Bug 904588: Convert MozIccManager to WebIDL, r=htsai, r=smaug
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/bindings/Bindings.conf
dom/icc/interfaces/moz.build
dom/icc/interfaces/nsIDOMIccManager.idl
dom/icc/src/IccManager.cpp
dom/icc/src/IccManager.h
dom/webidl/MozIccManager.webidl
dom/webidl/Navigator.webidl
dom/webidl/moz.build
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1543,17 +1543,17 @@ Navigator::GetMozVoicemail(ErrorResult& 
     if (aRv.Failed()) {
       return nullptr;
     }
   }
 
   return mVoicemail;
 }
 
-nsIDOMMozIccManager*
+IccManager*
 Navigator::GetMozIccManager(ErrorResult& aRv)
 {
   if (!mIccManager) {
     if (!mWindow) {
       aRv.Throw(NS_ERROR_UNEXPECTED);
       return nullptr;
     }
     NS_ENSURE_TRUE(mWindow->GetDocShell(), nullptr);
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -203,17 +203,17 @@ public:
   void MozSetMessageHandler(const nsAString& aType,
                             systemMessageCallback* aCallback,
                             ErrorResult& aRv);
   bool MozHasPendingMessage(const nsAString& aType, ErrorResult& aRv);
 #ifdef MOZ_B2G_RIL
   MobileConnectionArray* GetMozMobileConnections(ErrorResult& aRv);
   CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv);
   Voicemail* GetMozVoicemail(ErrorResult& aRv);
-  nsIDOMMozIccManager* GetMozIccManager(ErrorResult& aRv);
+  IccManager* GetMozIccManager(ErrorResult& aRv);
 #endif // MOZ_B2G_RIL
 #ifdef MOZ_GAMEPAD
   void GetGamepads(nsTArray<nsRefPtr<Gamepad> >& aGamepads, ErrorResult& aRv);
 #endif // MOZ_GAMEPAD
 #ifdef MOZ_B2G_FM
   FMRadio* GetMozFMRadio(ErrorResult& aRv);
 #endif
 #ifdef MOZ_B2G_BT
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -142,17 +142,16 @@
 #include "nsIDOMMobileMessageManager.h"
 #include "nsIDOMMozSmsMessage.h"
 #include "nsIDOMMozMmsMessage.h"
 #include "nsIDOMSmsFilter.h"
 #include "nsIDOMSmsSegmentInfo.h"
 #include "nsIDOMMozMobileMessageThread.h"
 
 #ifdef MOZ_B2G_RIL
-#include "nsIDOMIccManager.h"
 #include "nsIDOMMobileConnection.h"
 #endif // MOZ_B2G_RIL
 
 #ifdef MOZ_B2G_FM
 #include "FMRadio.h"
 #endif
 
 #include "nsIDOMGlobalObjectConstructor.h"
@@ -439,21 +438,16 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(MozCSSKeyframeRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(MozCSSKeyframesRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(CSSPageRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
-#ifdef MOZ_B2G_RIL
-  NS_DEFINE_CLASSINFO_DATA(MozIccManager, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
-#endif
-
   NS_DEFINE_CLASSINFO_DATA(CSSFontFeatureValuesRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(UserDataHandler, nsDOMGenericSH,
                                       DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(XPathNamespace, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CHROME_XBL_CLASSINFO_DATA(XULControlElement, nsDOMGenericSH,
@@ -1114,24 +1108,16 @@ nsDOMClassInfo::Init()
   DOM_CLASSINFO_MAP_BEGIN(MozCSSKeyframesRule, nsIDOMMozCSSKeyframesRule)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozCSSKeyframesRule)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(CSSPageRule, nsIDOMCSSPageRule)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSPageRule)
   DOM_CLASSINFO_MAP_END
 
-#ifdef MOZ_B2G_RIL
-  DOM_CLASSINFO_MAP_BEGIN(MozIccManager, nsIDOMMozIccManager)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMMozIccManager)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
-  DOM_CLASSINFO_MAP_END
-
-#endif
-
   DOM_CLASSINFO_MAP_BEGIN(CSSFontFeatureValuesRule, nsIDOMCSSFontFeatureValuesRule)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSFontFeatureValuesRule)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(UserDataHandler, nsIDOMUserDataHandler)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMUserDataHandler)
   DOM_CLASSINFO_MAP_END
 
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -85,20 +85,16 @@ DOMCI_CLASS(ContentFrameMessageManager)
 DOMCI_CLASS(ChromeMessageBroadcaster)
 DOMCI_CLASS(ChromeMessageSender)
 
 DOMCI_CLASS(MozCSSKeyframeRule)
 DOMCI_CLASS(MozCSSKeyframesRule)
 
 DOMCI_CLASS(CSSPageRule)
 
-#ifdef MOZ_B2G_RIL
-DOMCI_CLASS(MozIccManager)
-#endif
-
 DOMCI_CLASS(CSSFontFeatureValuesRule)
 
 DOMCI_CLASS(UserDataHandler)
 DOMCI_CLASS(XPathNamespace)
 DOMCI_CLASS(XULControlElement)
 DOMCI_CLASS(XULLabeledControlElement)
 DOMCI_CLASS(XULButtonElement)
 DOMCI_CLASS(XULCheckboxElement)
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -790,16 +790,20 @@ DOMInterfaces = {
 'MozCellBroadcast': {
     'nativeType': 'mozilla::dom::CellBroadcast',
 },
 
 'MozIcc': {
     'nativeType': 'mozilla::dom::Icc',
 },
 
+'MozIccManager': {
+    'nativeType': 'mozilla::dom::IccManager',
+},
+
 'MozMobileConnectionArray': {
     'nativeType': 'mozilla::dom::MobileConnectionArray',
     'resultNotAddRefed': [ 'item' ]
 },
 
 'MozNamedAttrMap': {
     'nativeType': 'nsDOMAttributeMap',
 },
@@ -1880,17 +1884,16 @@ addExternalIface('imgINotificationObserv
 addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True)
 addExternalIface('MenuBuilder', nativeType='nsIMenuBuilder', notflattened=True)
 addExternalIface('MozBoxObject', nativeType='nsIBoxObject')
 addExternalIface('MozControllers', nativeType='nsIControllers')
 addExternalIface('MozFrameLoader', nativeType='nsIFrameLoader', notflattened=True)
 addExternalIface('MozFrameRequestCallback', nativeType='nsIFrameRequestCallback',
                  notflattened=True)
 addExternalIface('MozIccInfo', headerFile='nsIDOMIccInfo.h')
-addExternalIface('MozIccManager', headerFile='nsIDOMIccManager.h')
 addExternalIface('MozMobileConnection', headerFile='nsIDOMMobileConnection.h')
 addExternalIface('MozMobileMessageManager', headerFile='nsIDOMMobileMessageManager.h')
 addExternalIface('MozObserver', nativeType='nsIObserver', notflattened=True)
 addExternalIface('MozRDFCompositeDataSource', nativeType='nsIRDFCompositeDataSource',
                  notflattened=True)
 addExternalIface('MozRDFResource', nativeType='nsIRDFResource', notflattened=True)
 addExternalIface('MozTreeBoxObject', nativeType='nsITreeBoxObject',
                  notflattened=True)
--- a/dom/icc/interfaces/moz.build
+++ b/dom/icc/interfaces/moz.build
@@ -1,13 +1,12 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 XPIDL_SOURCES += [
     'nsIDOMIccInfo.idl',
-    'nsIDOMIccManager.idl',
     'nsIIccProvider.idl',
 ]
 
 XPIDL_MODULE = 'dom_icc'
--- a/dom/icc/src/IccManager.cpp
+++ b/dom/icc/src/IccManager.cpp
@@ -1,178 +1,123 @@
 /* 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 "IccManager.h"
-
+#include "mozilla/dom/MozIccManagerBinding.h"
 #include "GeneratedEvents.h"
 #include "Icc.h"
 #include "IccListener.h"
 #include "mozilla/dom/IccChangeEvent.h"
 #include "mozilla/Preferences.h"
-#include "mozilla/Services.h"
-#include "nsIDOMClassInfo.h"
 #include "nsIDOMIccInfo.h"
 
 using namespace mozilla::dom;
 
-DOMCI_DATA(MozIccManager, IccManager)
-
 NS_IMPL_CYCLE_COLLECTION_CLASS(IccManager)
 
-NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(IccManager,
-                                               DOMEventTargetHelper)
-  NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mJsIccIds)
-  // We did not setup 'mIccListeners' being a participant of cycle collection is
-  // because in Navigator->Invalidate() it will call mIccManager->Shutdown(),
-  // then IccManager will call Shutdown() of each IccListener, this will release
-  // the reference that held by each mIccListener and break the cycle.
-NS_IMPL_CYCLE_COLLECTION_TRACE_END
-
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IccManager,
                                                   DOMEventTargetHelper)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(IccManager,
                                                 DOMEventTargetHelper)
-  tmp->Unroot();
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
+// QueryInterface implementation for IccManager
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IccManager)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMMozIccManager)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(MozIccManager)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(IccManager, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(IccManager, DOMEventTargetHelper)
 
 IccManager::IccManager(nsPIDOMWindow* aWindow)
-  : mJsIccIds(nullptr)
-  , mRooted(false)
+  : DOMEventTargetHelper(aWindow)
 {
-  BindToOwner(aWindow);
-
   uint32_t numberOfServices =
     mozilla::Preferences::GetUint("ril.numRadioInterfaces", 1);
 
   for (uint32_t i = 0; i < numberOfServices; i++) {
     nsRefPtr<IccListener> iccListener = new IccListener(this, i);
     mIccListeners.AppendElement(iccListener);
   }
 }
 
 IccManager::~IccManager()
 {
   Shutdown();
-  Unroot();
+}
+
+JSObject*
+IccManager::WrapObject(JSContext* aCx)
+{
+  return MozIccManagerBinding::Wrap(aCx, this);
 }
 
 void
 IccManager::Shutdown()
 {
   for (uint32_t i = 0; i < mIccListeners.Length(); i++) {
     mIccListeners[i]->Shutdown();
     mIccListeners[i] = nullptr;
   }
   mIccListeners.Clear();
 }
 
 nsresult
 IccManager::NotifyIccAdd(const nsAString& aIccId)
 {
-  mJsIccIds = nullptr;
+  MozIccManagerBinding::ClearCachedIccIdsValue(this);
 
   IccChangeEventInit init;
   init.mBubbles = false;
   init.mCancelable = false;
   init.mIccId = aIccId;
 
   nsRefPtr<IccChangeEvent> event =
     IccChangeEvent::Constructor(this, NS_LITERAL_STRING("iccdetected"), init);
 
   return DispatchTrustedEvent(event);
 }
 
 nsresult
 IccManager::NotifyIccRemove(const nsAString& aIccId)
 {
-  mJsIccIds = nullptr;
+  MozIccManagerBinding::ClearCachedIccIdsValue(this);
 
   IccChangeEventInit init;
   init.mBubbles = false;
   init.mCancelable = false;
   init.mIccId = aIccId;
 
   nsRefPtr<IccChangeEvent> event =
     IccChangeEvent::Constructor(this, NS_LITERAL_STRING("iccundetected"), init);
 
   return DispatchTrustedEvent(event);
 }
 
-void
-IccManager::Root()
-{
-  if (!mRooted) {
-    mozilla::HoldJSObjects(this);
-    mRooted = true;
-  }
-}
+// MozIccManager
 
 void
-IccManager::Unroot()
+IccManager::GetIccIds(nsTArray<nsString>& aIccIds)
 {
-  if (mRooted) {
-    mJsIccIds = nullptr;
-    mozilla::DropJSObjects(this);
-    mRooted = false;
+  nsTArray<nsRefPtr<IccListener>>::size_type i;
+  for (i = 0; i < mIccListeners.Length(); ++i) {
+    nsRefPtr<Icc> icc = mIccListeners[i]->GetIcc();
+    if (icc) {
+      aIccIds.AppendElement(icc->GetIccId());
+    }
   }
 }
 
-// nsIDOMMozIccManager
-
-NS_IMETHODIMP
-IccManager::GetIccIds(JS::MutableHandle<JS::Value> aIccIds)
+already_AddRefed<nsISupports>
+IccManager::GetIccById(const nsAString& aIccId) const
 {
-  if (!mJsIccIds) {
-    nsTArray<nsString> iccIds;
-    for (uint32_t i = 0; i < mIccListeners.Length(); i++) {
-      nsRefPtr<Icc> icc = mIccListeners[i]->GetIcc();
-      if (icc) {
-        iccIds.AppendElement(icc->GetIccId());
-      }
-    }
-
-    nsresult rv;
-    nsIScriptContext* sc = GetContextForEventHandlers(&rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    AutoPushJSContext cx(sc->GetNativeContext());
-    JS::Rooted<JSObject*> jsIccIds(cx);
-    rv = nsTArrayToJSArray(cx, iccIds, jsIccIds.address());
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    mJsIccIds = jsIccIds;
-    Root();
-  }
-
-  aIccIds.setObject(*mJsIccIds);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-IccManager::GetIccById(const nsAString& aIccId, nsISupports** aIcc)
-{
-  *aIcc = nullptr;
-
-  for (uint32_t i = 0; i < mIccListeners.Length(); i++) {
+  nsTArray<nsRefPtr<IccListener>>::size_type i;
+  for (i = 0; i < mIccListeners.Length(); ++i) {
     nsRefPtr<Icc> icc = mIccListeners[i]->GetIcc();
     if (icc && aIccId == icc->GetIccId()) {
-      icc.forget(aIcc);
-      return NS_OK;
+      return icc.forget();
     }
   }
-
-  return NS_OK;
+  return nullptr;
 }
-
-NS_IMPL_EVENT_HANDLER(IccManager, iccdetected)
-NS_IMPL_EVENT_HANDLER(IccManager, iccundetected)
--- a/dom/icc/src/IccManager.h
+++ b/dom/icc/src/IccManager.h
@@ -2,58 +2,60 @@
  * 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/. */
 
 #ifndef mozilla_dom_IccManager_h
 #define mozilla_dom_IccManager_h
 
 #include "mozilla/DOMEventTargetHelper.h"
 #include "nsCycleCollectionParticipant.h"
-#include "nsIDOMIccManager.h"
 #include "nsIIccProvider.h"
 #include "nsTArrayHelpers.h"
 
 namespace mozilla {
 namespace dom {
 
 class IccListener;
 
 class IccManager MOZ_FINAL : public DOMEventTargetHelper
-                           , public nsIDOMMozIccManager
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_NSIDOMMOZICCMANAGER
 
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
 
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(IccManager,
-                                                         DOMEventTargetHelper)
+  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IccManager, DOMEventTargetHelper)
 
   IccManager(nsPIDOMWindow* aWindow);
   ~IccManager();
 
   void
   Shutdown();
 
   nsresult
   NotifyIccAdd(const nsAString& aIccId);
 
   nsresult
   NotifyIccRemove(const nsAString& aIccId);
 
+  IMPL_EVENT_HANDLER(iccdetected)
+  IMPL_EVENT_HANDLER(iccundetected)
+
+  void
+  GetIccIds(nsTArray<nsString>& aIccIds);
+
+  already_AddRefed<nsISupports>
+  GetIccById(const nsAString& aIccId) const;
+
+  nsPIDOMWindow*
+  GetParentObject() const { return GetOwner(); }
+
+  virtual JSObject*
+  WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
 private:
   nsTArray<nsRefPtr<IccListener>> mIccListeners;
-
-  // Cached iccIds js array object. Cleared whenever the NotifyIccAdd() or
-  // NotifyIccRemove() is called, and then rebuilt once a page looks for the
-  // iccIds attribute.
-  JS::Heap<JSObject*> mJsIccIds;
-  bool mRooted;
-
-  void Root();
-  void Unroot();
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_IccManager_h
rename from dom/icc/interfaces/nsIDOMIccManager.idl
rename to dom/webidl/MozIccManager.webidl
--- a/dom/icc/interfaces/nsIDOMIccManager.idl
+++ b/dom/webidl/MozIccManager.webidl
@@ -1,18 +1,15 @@
+/* -*- 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/. */
+ * 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 "nsIDOMEventTarget.idl"
-
-interface nsIDOMMozIcc;
-
-[scriptable, builtinclass, uuid(67e40e8e-35ee-40a4-a5b8-414588675133)]
-interface nsIDOMMozIccManager : nsIDOMEventTarget
+[Pref="dom.icc.enabled"]
+interface MozIccManager : EventTarget
 {
   /**
    * STK menu presentation types.
    */
   const unsigned short STK_MENU_TYPE_NOT_SPECIFIED      = 0x00;
   const unsigned short STK_MENU_TYPE_DATA_VALUES        = 0x01;
   const unsigned short STK_MENU_TYPE_NAVIGATION_OPTIONS = 0x03;
 
@@ -226,30 +223,31 @@ interface nsIDOMMozIccManager : nsIDOMEv
    * Next Action Indicator.
    */
   const unsigned short STK_NEXT_ACTION_NULL                  = 0x00;
   const unsigned short STK_NEXT_ACTION_END_PROACTIVE_SESSION = 0x81;
 
   /**
    * Array of iccIds that are currently detected.
    */
-  readonly attribute jsval iccIds;  // DOMString[]
+  [Cached, Pure]
+  readonly attribute sequence<DOMString> iccIds;
 
   /**
    * Get ICC object by iccId.
    *
    * @param iccId
    *        The identifier of the ICC.
    *
    * @return see MozIcc.webidl for the detail.
    */
-  nsISupports getIccById(in DOMString iccId);
+  nsISupports getIccById(DOMString iccId);
 
   /**
    * 'oniccdetected' event is notified whenever a new ICC is detected.
    */
-  [implicit_jscontext] attribute jsval oniccdetected;
+  attribute EventHandler oniccdetected;
 
   /**
    * 'oniccundetected' event is notified whenever an ICC becomes undetected.
    */
-  [implicit_jscontext] attribute jsval oniccundetected;
+  attribute EventHandler oniccundetected;
 };
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -268,18 +268,16 @@ partial interface Navigator {
   readonly attribute MozCellBroadcast mozCellBroadcast;
 };
 
 partial interface Navigator {
   [Throws, Func="Navigator::HasVoicemailSupport"]
   readonly attribute MozVoicemail mozVoicemail;
 };
 
-// nsIMozNavigatorIccManager
-interface MozIccManager;
 partial interface Navigator {
   [Throws, Func="Navigator::HasIccManagerSupport"]
   readonly attribute MozIccManager? mozIccManager;
 };
 #endif // MOZ_B2G_RIL
 
 partial interface Navigator {
   [Throws, Func="Navigator::HasTelephonySupport"]
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -538,16 +538,17 @@ if CONFIG['MOZ_B2G_BT']:
     ]
 
 if CONFIG['MOZ_B2G_RIL']:
     WEBIDL_FILES += [
         'IccCardLockError.webidl',
         'MozCellBroadcast.webidl',
         'MozCellBroadcastEvent.webidl',
         'MozIcc.webidl',
+        'MozIccManager.webidl',
         'MozMobileConnectionArray.webidl',
         'MozVoicemail.webidl',
         'MozVoicemailEvent.webidl',
     ]
 
 if CONFIG['MOZ_NFC']:
     WEBIDL_FILES += [
          'MozNDEFRecord.webidl',