Bug 829252 part 4. Turn on the EventTarget quickstubs. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 29 Jan 2013 08:44:01 -0500
changeset 120209 2b9a689ac459a8a977433b35f6cb178299372bb8
parent 120208 aa85bbb41c0486ad6d407f42ec671074f8fbf443
child 120210 42a89eaa94e03377ab01f68e0ff0d00266d9aee7
push id22091
push userbzbarsky@mozilla.com
push dateTue, 29 Jan 2013 13:44:18 +0000
treeherdermozilla-inbound@2b9a689ac459 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs829252
milestone21.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
Bug 829252 part 4. Turn on the EventTarget quickstubs. r=peterv
content/events/test/Makefile.in
content/events/test/test_addEventListenerExtraArg.html
dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json
js/xpconnect/src/dom_quickstubs.qsconf
--- a/content/events/test/Makefile.in
+++ b/content/events/test/Makefile.in
@@ -95,16 +95,17 @@ MOCHITEST_FILES = \
 		test_moz_mouse_pixel_scroll_event.html \
 		test_wheel_default_action.html \
 		window_wheel_default_action.html \
 		test_bug603008.html \
 		test_bug716822.html \
 		test_bug742376.html \
 		test_dragstart.html \
 		test_bug812744.html \
+		test_addEventListenerExtraArg.html \
 		$(NULL)
 
 MOCHITEST_CHROME_FILES = \
 		test_bug336682_2.xul \
 		test_bug336682.js \
 		test_bug586961.xul \
 		test_bug415498.xul \
 		bug415498-doc1.html \
new file mode 100644
--- /dev/null
+++ b/content/events/test/test_addEventListenerExtraArg.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=828554
+-->
+<head>
+  <meta charset="utf-8">
+  <title>Test for Bug 828554</title>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+  <script type="application/javascript">
+
+  /** Test for Bug 828554 **/
+  SimpleTest.waitForExplicitFinish();
+  window.addEventListener("message", function() {
+    ok(true, "We got called");
+    SimpleTest.finish();
+  }, false, undefined);
+  window.postMessage("Hey there", "*");
+  </script>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=828554">Mozilla Bug 828554</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+</pre>
+</body>
+</html>
--- a/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json
+++ b/dom/imptests/failures/webapps/DOMCore/tests/approved/test_interfaces.html.json
@@ -67,19 +67,16 @@
   "MutationCallback interface: existence and properties of interface object": true,
   "MutationCallback interface: existence and properties of interface prototype object": true,
   "MutationCallback interface: existence and properties of interface prototype object's \"constructor\" property": true,
   "MutationCallback interface: operation handleEvent(MutationRecord,MutationObserver)": true,
   "XMLDocument interface: existence and properties of interface object": true,
   "XMLDocument interface: existence and properties of interface prototype object": true,
   "XMLDocument interface: existence and properties of interface prototype object's \"constructor\" property": true,
   "Stringification of xmlDoc": "debug",
-  "EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on xmlDoc with too few arguments must throw TypeError": true,
-  "EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on xmlDoc with too few arguments must throw TypeError": true,
-  "EventTarget interface: calling dispatchEvent(Event) on xmlDoc with too few arguments must throw TypeError": true,
   "DocumentType interface: operation remove()": true,
   "DocumentType interface: document.doctype must inherit property \"remove\" with the proper type (3)": true,
   "Element interface: attribute namespaceURI": true,
   "Element interface: attribute prefix": true,
   "Element interface: attribute localName": true,
   "Element interface: attribute attributes": true,
   "Element interface: attribute className": true,
   "Element interface: operation remove()": true,
--- a/js/xpconnect/src/dom_quickstubs.qsconf
+++ b/js/xpconnect/src/dom_quickstubs.qsconf
@@ -71,21 +71,16 @@ members = [
     'nsIDOMText.splitText',
     'nsIDOMDOMStringList.*',
     'nsIDOMXULDocument.getBoxObjectFor',
 
     # dom/interfaces/css
     'nsIDOMElementCSSInlineStyle.*',
     'nsIDOMRect.*',
 
-    # dom/interfaces/events
-    'nsIDOMEventTarget.addEventListener',
-    'nsIDOMEventTarget.removeEventListener',
-    'nsIDOMEventTarget.dispatchEvent',
-
     'nsIDOMEvent.type',
     'nsIDOMEvent.target',
     'nsIDOMEvent.currentTarget',
     'nsIDOMEvent.eventPhase',
     'nsIDOMEvent.bubbles',
     'nsIDOMEvent.cancelable',
     'nsIDOMEvent.timeStamp',
     'nsIDOMEvent.stopPropagation',
@@ -332,16 +327,17 @@ customIncludes = [
     'nsICSSDeclaration.h',
     'mozilla/dom/NodeBinding.h',
     'mozilla/dom/ElementBinding.h',
     'mozilla/dom/HTMLElementBinding.h',
     'mozilla/dom/DocumentBinding.h',
     'mozilla/dom/SVGElementBinding.h',
     'nsPerformance.h',
     'mozilla/dom/HTMLDocumentBinding.h',
+    'mozilla/dom/EventTargetBinding.h',
     ]
 
 customReturnInterfaces = [
     'nsIDOMCanvasPattern',
     'nsIDOMCanvasGradient',
     ]
 
 nsIDOMStorage_Clear_customMethodCallCode = """
@@ -388,9 +384,10 @@ customMethodCalls = {
 
 newBindingProperties = {
     'nsIDOMNode': 'mozilla::dom::NodeBinding::sNativePropertyHooks.mNativeProperties.regular',
     'nsIDOMElement': 'mozilla::dom::ElementBinding::sNativePropertyHooks.mNativeProperties.regular',
     'nsIDOMHTMLElement': 'mozilla::dom::HTMLElementBinding::sNativePropertyHooks.mNativeProperties.regular',
     'nsIDOMDocument': 'mozilla::dom::DocumentBinding::sNativePropertyHooks.mNativeProperties.regular',
     'nsIDOMSVGElement': 'mozilla::dom::SVGElementBinding::sNativePropertyHooks.mNativeProperties.regular',
     'nsIDOMHTMLDocument': 'mozilla::dom::HTMLDocumentBinding::sNativePropertyHooks.mNativeProperties.regular',
+    'nsIDOMEventTarget': 'mozilla::dom::EventTargetBinding::sNativePropertyHooks.mNativeProperties.regular',
     }