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.
Created attachment 41539 [details] Proposed patch.
Comment on attachment 41539 [details] Proposed patch. r=me
Landed: http://trac.webkit.org/changeset/49911