Bug 22512

Summary: Add a test to check for crashes in attaching an event to a created document.
Product: WebKit Reporter: David Levin <levin>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: levin, pam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
A patch to add the test.
none
Addressed the comments by Eric. eric: review+

Description David Levin 2008-11-26 10:57:08 PST
Need to add the test.
Comment 1 David Levin 2008-11-26 11:01:10 PST
Created attachment 25521 [details]
A patch to add the test.
Comment 2 Eric Seidel (no email) 2008-11-26 11:23:41 PST
Comment on attachment 25521 [details]
A patch to add the test.

This is an interesting combination of the old single-file .html style tests, and the new .js tests which use the fast/js/resources .js files and a TEMPLATE.html file. :)  Sadly none of this is very well documented, but what I think in an ideal world what you would have wanted to do was to add a fast/events/resources/create-document-crash-on-attach-event.js file with just the <script> section of your test, and then run make-js-test-wrappers to generate the corresponding .html file from the template (which likely already exists as fast/events/resources/TEMPLATE.html).  make-js-test-wrappers also automatically makes sure your .js file ends with var successfulllyParsed = true; etc.

Also, I think it's a bad idea to check for document.implementation and document.implementation.createDocument and allow the test to "pass" (or at least not do anything) if they're not found.

Do you have any information as to when this last crashed?  Was this only ever a crash for Chromium?
Comment 3 David Levin 2008-11-26 12:07:24 PST
Created attachment 25525 [details]
Addressed the comments by Eric.

The crash only happened in Chromium.
Comment 4 Eric Seidel (no email) 2008-12-09 14:49:39 PST
Comment on attachment 25525 [details]
Addressed the comments by Eric.

Looks fine.
Comment 5 Pam Greene (IRC:pamg) 2008-12-09 17:35:19 PST
Landed in r39159.