[Webkit-unassigned] [Bug 21063] New: NULL pointer in XHR dispatchEvent(null);
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 24 10:01:21 PDT 2008
https://bugs.webkit.org/show_bug.cgi?id=21063
Summary: NULL pointer in XHR dispatchEvent(null);
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: deanm at chromium.org
CC: skylined at chromium.org
We found this a while ago, looks like it never got filed:
var xhr = new XMLHttpRequest();
xhr.dispatchEvent(null);
I don't have a mac, or a webkit build where I can test and make a layout test.
However, it should be trivial to turn the above into a layout test, and apply
and test this patch:
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp
index 4b4bc96..0303d01 100644
--- a/WebCore/xml/XMLHttpRequest.cpp
+++ b/WebCore/xml/XMLHttpRequest.cpp
@@ -309,7 +309,7 @@ void XMLHttpRequest::removeEventListener(const
AtomicString&
bool XMLHttpRequest::dispatchEvent(PassRefPtr<Event> evt, ExceptionCode& ec,
bo
{
// FIXME: check for other error conditions enumerated in the spec.
- if (evt->type().isEmpty()) {
+ if (!evt || evt->type().isEmpty()) {
ec = EventException::UNSPECIFIED_EVENT_TYPE_ERR;
return true;
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list