Bug 30611

Summary: Fix the crash when a node not in a document receives dispatchEvent.
Product: WebKit Reporter: Dmitry Titov <dimich>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed patch. darin: review+, dimich: commit-queue-

Description Dmitry Titov 2009-10-20 17:36:06 PDT
The node that doesn't have a document (easy to repro with documentType node which is just created) crashes while trying to dispatchEvent.
FireFox in similar scenario simply treats dispatchEvent() as noop. We should do the same. Patch is coming.
Comment 1 Dmitry Titov 2009-10-20 17:52:55 PDT
Created attachment 41539 [details]
Proposed patch.
Comment 2 Darin Adler 2009-10-20 23:53:47 PDT
Comment on attachment 41539 [details]
Proposed patch.

r=me
Comment 3 Dmitry Titov 2009-10-21 11:35:08 PDT
Landed: http://trac.webkit.org/changeset/49911