Bug 22200

Summary: Crash when close event is dispatched to MessagePort due to document destruction
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: DOMAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
proposed fix darin: review+

Description Alexey Proskuryakov 2008-11-11 23:42:33 PST
According to current HTML5 text, a close event should be dispatched to MessagePorts whose entangled ports belong to a document that is being destructed.

This causes crashes for us in some circumstances, because the document can be destroyed from the same GC run that destroys ports and their event listeners. But also, this requirement is logically incorrect, because it makes behavior depend on GC order in some cases.

This has not been resolved in HTML5 yet, but I want to fix the crash anyway. Patch forthcoming.
Comment 1 Alexey Proskuryakov 2008-11-12 00:21:14 PST
Created attachment 25091 [details]
proposed fix
Comment 2 Darin Adler 2008-11-12 07:41:17 PST
Comment on attachment 25091 [details]
proposed fix

r=me
Comment 3 Alexey Proskuryakov 2008-11-12 23:33:08 PST
Committed revision 38366.