Bug 693172 - Move all subclasses of nsDOMEventTargetHelper to nsDOMEventTargetWrapperCache in dom/telephony/ r=smaug
☠☠ backed out by 11a6c1a82ffb ☠ ☠
authorVivien Nicolas <21@vingtetun.org>
Wed, 08 Feb 2012 11:14:31 -0800
changeset 86447 73614cfcb98393a2a69d72405a692d5f0abc1861
parent 86446 2cc517a81061f7c03314262da849a73d1a6dd45f
child 86448 11a6c1a82ffbeee13c62809ddd89afa83d1c8900
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs693172
milestone13.0a1
Bug 693172 - Move all subclasses of nsDOMEventTargetHelper to nsDOMEventTargetWrapperCache in dom/telephony/ r=smaug
dom/telephony/Telephony.cpp
dom/telephony/Telephony.h
dom/telephony/TelephonyCall.cpp
dom/telephony/TelephonyCall.h
dom/telephony/TelephonyCommon.h
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -158,45 +158,45 @@ Telephony::SwitchActiveCall(TelephonyCal
     NS_NOTYETIMPLEMENTED("Implement me!");
   }
   mActiveCall = aCall;
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(Telephony)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(Telephony,
-                                                  nsDOMEventTargetWrapperCache)
+                                                  nsDOMEventTargetHelper)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(incoming)
   for (PRUint32 index = 0; index < tmp->mCalls.Length(); index++) {
     NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mCalls[i]");
     cb.NoteXPCOMChild(tmp->mCalls[index]->ToISupports());
   }
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(Telephony,
-                                               nsDOMEventTargetWrapperCache)
+                                               nsDOMEventTargetHelper)
   NS_IMPL_CYCLE_COLLECTION_TRACE_JS_CALLBACK(tmp->mCallsArray, "mCallsArray")
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(Telephony,
-                                                nsDOMEventTargetWrapperCache)
+                                                nsDOMEventTargetHelper)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(incoming)
   tmp->mCalls.Clear();
   tmp->mActiveCall = nsnull;
   tmp->mCallsArray = nsnull;
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(Telephony)
   NS_INTERFACE_MAP_ENTRY(nsIDOMTelephony)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(Telephony)
-NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetWrapperCache)
+NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
 
-NS_IMPL_ADDREF_INHERITED(Telephony, nsDOMEventTargetWrapperCache)
-NS_IMPL_RELEASE_INHERITED(Telephony, nsDOMEventTargetWrapperCache)
+NS_IMPL_ADDREF_INHERITED(Telephony, nsDOMEventTargetHelper)
+NS_IMPL_RELEASE_INHERITED(Telephony, nsDOMEventTargetHelper)
 
 DOMCI_DATA(Telephony, Telephony)
 
 NS_IMPL_ISUPPORTS1(Telephony::RILTelephonyCallback, nsIRILTelephonyCallback)
 
 NS_IMETHODIMP
 Telephony::Dial(const nsAString& aNumber, nsIDOMTelephonyCall** aResult)
 {
--- a/dom/telephony/Telephony.h
+++ b/dom/telephony/Telephony.h
@@ -46,17 +46,17 @@
 #include "nsIDOMTelephonyCall.h"
 #include "nsIRadioInterfaceLayer.h"
 
 class nsIScriptContext;
 class nsPIDOMWindow;
 
 BEGIN_TELEPHONY_NAMESPACE
 
-class Telephony : public nsDOMEventTargetWrapperCache,
+class Telephony : public nsDOMEventTargetHelper,
                   public nsIDOMTelephony
 {
   nsCOMPtr<nsIRadioInterfaceLayer> mRIL;
   nsCOMPtr<nsIRILTelephonyCallback> mRILTelephonyCallback;
 
   NS_DECL_EVENT_HANDLER(incoming)
 
   TelephonyCall* mActiveCall;
@@ -67,28 +67,28 @@ class Telephony : public nsDOMEventTarge
   JSObject* mCallsArray;
 
   bool mRooted;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMTELEPHONY
   NS_DECL_NSIRILTELEPHONYCALLBACK
-  NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetWrapperCache::)
+  NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper::)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
                                                    Telephony,
-                                                   nsDOMEventTargetWrapperCache)
+                                                   nsDOMEventTargetHelper)
 
   static already_AddRefed<Telephony>
   Create(nsPIDOMWindow* aOwner, nsIRadioInterfaceLayer* aRIL);
 
   nsIDOMEventTarget*
   ToIDOMEventTarget() const
   {
-    return static_cast<nsDOMEventTargetWrapperCache*>(
+    return static_cast<nsDOMEventTargetHelper*>(
              const_cast<Telephony*>(this));
   }
 
   nsISupports*
   ToISupports() const
   {
     return ToIDOMEventTarget();
   }
--- a/dom/telephony/TelephonyCall.cpp
+++ b/dom/telephony/TelephonyCall.cpp
@@ -148,51 +148,51 @@ TelephonyCall::ChangeStateInternal(PRUin
       }
     }
   }
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(TelephonyCall)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(TelephonyCall,
-                                                  nsDOMEventTargetWrapperCache)
+                                                  nsDOMEventTargetHelper)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_PTR(tmp->mTelephony->ToISupports(),
                                                Telephony, "mTelephony")
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(statechange)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(dialing)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(ringing)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(busy)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(connecting)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(connected)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(disconnecting)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(disconnected)
   NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(incoming)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(TelephonyCall,
-                                                nsDOMEventTargetWrapperCache)
+                                                nsDOMEventTargetHelper)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mTelephony)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(statechange)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(dialing)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(ringing)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(busy)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(connecting)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(connected)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(disconnecting)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(disconnected)
   NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(incoming)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(TelephonyCall)
   NS_INTERFACE_MAP_ENTRY(nsIDOMTelephonyCall)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(TelephonyCall)
-NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetWrapperCache)
+NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
 
-NS_IMPL_ADDREF_INHERITED(TelephonyCall, nsDOMEventTargetWrapperCache)
-NS_IMPL_RELEASE_INHERITED(TelephonyCall, nsDOMEventTargetWrapperCache)
+NS_IMPL_ADDREF_INHERITED(TelephonyCall, nsDOMEventTargetHelper)
+NS_IMPL_RELEASE_INHERITED(TelephonyCall, nsDOMEventTargetHelper)
 
 DOMCI_DATA(TelephonyCall, TelephonyCall)
 
 NS_IMETHODIMP
 TelephonyCall::GetNumber(nsAString& aNumber)
 {
   aNumber.Assign(mNumber);
   return NS_OK;
--- a/dom/telephony/TelephonyCall.h
+++ b/dom/telephony/TelephonyCall.h
@@ -44,17 +44,17 @@
 
 #include "nsIDOMTelephonyCall.h"
 #include "nsIRadioInterfaceLayer.h"
 
 class nsPIDOMWindow;
 
 BEGIN_TELEPHONY_NAMESPACE
 
-class TelephonyCall : public nsDOMEventTargetWrapperCache,
+class TelephonyCall : public nsDOMEventTargetHelper,
                       public nsIDOMTelephonyCall
 {
   NS_DECL_EVENT_HANDLER(statechange)
   NS_DECL_EVENT_HANDLER(dialing)
   NS_DECL_EVENT_HANDLER(ringing)
   NS_DECL_EVENT_HANDLER(busy)
   NS_DECL_EVENT_HANDLER(connecting)
   NS_DECL_EVENT_HANDLER(connected)
@@ -70,28 +70,28 @@ class TelephonyCall : public nsDOMEventT
   PRUint32 mCallIndex;
   PRUint16 mCallState;
   bool mLive;
   bool mOutgoing;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMTELEPHONYCALL
-  NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetWrapperCache::)
+  NS_FORWARD_NSIDOMEVENTTARGET(nsDOMEventTargetHelper::)
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TelephonyCall,
-                                           nsDOMEventTargetWrapperCache)
+                                           nsDOMEventTargetHelper)
 
   static already_AddRefed<TelephonyCall>
   Create(Telephony* aTelephony, const nsAString& aNumber, PRUint16 aCallState,
          PRUint32 aCallIndex = kOutgoingPlaceholderCallIndex);
 
   nsIDOMEventTarget*
   ToIDOMEventTarget() const
   {
-    return static_cast<nsDOMEventTargetWrapperCache*>(
+    return static_cast<nsDOMEventTargetHelper*>(
              const_cast<TelephonyCall*>(this));
   }
 
   nsISupports*
   ToISupports() const
   {
     return ToIDOMEventTarget();
   }
--- a/dom/telephony/TelephonyCommon.h
+++ b/dom/telephony/TelephonyCommon.h
@@ -39,17 +39,17 @@
 
 #ifndef mozilla_dom_telephony_telephonycommon_h__
 #define mozilla_dom_telephony_telephonycommon_h__
 
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
-#include "nsDOMEventTargetWrapperCache.h"
+#include "nsDOMEventTargetHelper.h"
 #include "nsStringGlue.h"
 #include "nsTArray.h"
 
 #define BEGIN_TELEPHONY_NAMESPACE \
   namespace mozilla { namespace dom { namespace telephony {
 #define END_TELEPHONY_NAMESPACE \
   } /* namespace telephony */ } /* namespace dom */ } /* namespace mozilla */
 #define USING_TELEPHONY_NAMESPACE \