- fixed crash in one of the W3C DOM tests
* khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::dispatchEvent): Check for NULL which means
the passed object is not an event. Return without raising an exception because that's
what Gecko does despite the fact that the DOM test expects a (platform-specific) exception.
* layout-tests/dom/html/level2/events/dispatchEvent01-expected.txt: Added.
* layout-tests/dom/html/level2/events/dispatchEvent01.html: Added.
* layout-tests/dom/html/level2/events/dispatchEvent01.html-disabled: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10071
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
--- /dev/null
+Test: http://www.w3.org/2001/DOM-Test-Suite/level2/events/dispatchEvent01
+Status: failure
+Detail: throw_ImplException: assertTrue failed
+2005-08-06 Darin Adler <darin@apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ - fixed crash in one of the W3C DOM tests
+
+ * khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::dispatchEvent): Check for NULL which means
+ the passed object is not an event. Return without raising an exception because that's
+ what Gecko does despite the fact that the DOM test expects a (platform-specific) exception.
+
+ * layout-tests/dom/html/level2/events/dispatchEvent01-expected.txt: Added.
+ * layout-tests/dom/html/level2/events/dispatchEvent01.html: Added.
+ * layout-tests/dom/html/level2/events/dispatchEvent01.html-disabled: Removed.
+
2005-08-06 Darin Adler <darin@apple.com>
Reviewed by Dave Hyatt.
bool NodeImpl::dispatchEvent(EventImpl *evt, int &exceptioncode, bool tempEvent)
{
+ if (!evt) {
+ exceptioncode = 0;
+ return false;
+ }
+
evt->ref();
evt->setTarget(this);