Backed out changeset db836ecd7746 (bug 943613) for build bustage
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 26 Nov 2013 22:14:19 -0500
changeset 157712 b66f95073899a41c3882dbb69efcb813e0b4007f
parent 157711 3964ce61dacf3d514b083268f2391548a6ed34b0
child 157713 9849749f362326a0c48b53712e9444c424211aa1
push id25719
push usercbook@mozilla.com
push dateWed, 27 Nov 2013 09:57:23 +0000
treeherdermozilla-central@2e3d89ed5dc7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs943613
milestone28.0a1
backs outdb836ecd774677c67cf55bccf2f70025c3d9ae59
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
Backed out changeset db836ecd7746 (bug 943613) for build bustage
content/events/src/nsDOMEventTargetHelper.cpp
content/events/src/nsDOMEventTargetHelper.h
content/events/src/nsEventListenerManager.cpp
--- a/content/events/src/nsDOMEventTargetHelper.cpp
+++ b/content/events/src/nsDOMEventTargetHelper.cpp
@@ -353,22 +353,8 @@ nsDOMEventTargetHelper::WantsUntrusted(b
   nsIScriptContext* context = GetContextForEventHandlers(&rv);
   NS_ENSURE_SUCCESS(rv, rv);
   nsCOMPtr<nsIDocument> doc =
     nsContentUtils::GetDocumentFromScriptContext(context);
   // We can let listeners on workers to always handle all the events.
   *aRetVal = (doc && !nsContentUtils::IsChromeDoc(doc)) || !NS_IsMainThread();
   return rv;
 }
-
-void
-nsDOMEventTargetHelper::EventListenerAdded(nsIAtom* aType)
-{
-  mozilla::ErrorResult rv;
-  EventListenerAdded(Substring(nsDependentAtomString(aType), 2), rv);
-}
-
-void
-nsDOMEventTargetHelper::EventListenerRemoved(nsIAtom* aType)
-{
-  mozilla::ErrorResult rv;
-  EventListenerRemoved(Substring(nsDependentAtomString(aType), 2), rv);
-}
--- a/content/events/src/nsDOMEventTargetHelper.h
+++ b/content/events/src/nsDOMEventTargetHelper.h
@@ -12,24 +12,19 @@
 #include "nsPIDOMWindow.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsEventListenerManager.h"
 #include "nsIScriptContext.h"
 #include "MainThreadUtils.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/EventTarget.h"
 
-class JSCompartment;
-namespace mozilla {
-class ErrorResult;
-}
-
 #define NS_DOMEVENTTARGETHELPER_IID \
-{ 0xa28385c6, 0x9451, 0x4d7e, \
-  { 0xa3, 0xdd, 0xf4, 0xb6, 0x87, 0x2f, 0xa4, 0x76 } }
+{ 0xda0e6d40, 0xc17b, 0x4937, \
+  { 0x8e, 0xa2, 0x99, 0xca, 0x1c, 0x81, 0xea, 0xbe } }
 
 class nsDOMEventTargetHelper : public mozilla::dom::EventTarget
 {
 public:
   nsDOMEventTargetHelper()
     : mParentObject(nullptr)
     , mOwnerWindow(nullptr)
     , mHasOrHasHadOwnerWindow(false)
@@ -125,25 +120,16 @@ public:
 
   nsPIDOMWindow* GetOwner() const { return mOwnerWindow; }
   void BindToOwner(nsIGlobalObject* aOwner);
   void BindToOwner(nsPIDOMWindow* aOwner);
   void BindToOwner(nsDOMEventTargetHelper* aOther);
   virtual void DisconnectFromOwner();                   
   nsIGlobalObject* GetParentObject() const { return mParentObject; }
   bool HasOrHasHadOwner() { return mHasOrHasHadOwnerWindow; }
-
-  virtual void EventListenerAdded(nsIAtom* aType) MOZ_OVERRIDE;
-  virtual void EventListenerRemoved(nsIAtom* aType) MOZ_OVERRIDE;
-  virtual void EventListenerAdded(const nsAString& aType,
-                                  mozilla::ErrorResult& aRv,
-                                  JSCompartment* aCompartment = nullptr) {}
-  virtual void EventListenerRemoved(const nsAString& aType,
-                                    mozilla::ErrorResult& aRv,
-                                    JSCompartment* aCompartment = nullptr) {}
 protected:
   nsresult WantsUntrusted(bool* aRetVal);
 
   nsRefPtr<nsEventListenerManager> mListenerManager;
   // Dispatch a trusted, non-cancellable and non-bubbling event to |this|.
   nsresult DispatchTrustedEvent(const nsAString& aEventName);
   // Make |event| trusted and dispatch |aEvent| to |this|.
   nsresult DispatchTrustedEvent(nsIDOMEvent* aEvent);
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -609,17 +609,17 @@ nsEventListenerManager::SetEventHandlerI
   } else {
     nsIJSEventListener* scriptListener = ls->GetJSListener();
     MOZ_ASSERT(scriptListener,
                "How can we have an event handler with no nsIJSEventListener?");
 
     bool same = scriptListener->GetHandler() == aHandler;
     // Possibly the same listener, but update still the context and scope.
     scriptListener->SetHandler(aHandler, aScopeObject);
-    if (mTarget && !same && aName) {
+    if (mTarget && !same) {
       mTarget->EventListenerRemoved(aName);
       mTarget->EventListenerAdded(aName);
     }
   }
 
   // Set flag to indicate possible need for compilation later
   ls->mHandlerIsString = !aHandler.HasEventHandler();
   if (aPermitUntrustedEvents) {