Bug 22200 - Crash when close event is dispatched to MessagePort due to document destruction
Summary: Crash when close event is dispatched to MessagePort due to document destruction
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 23:42 PST by Alexey Proskuryakov
Modified: 2008-11-12 23:33 PST (History)
0 users

See Also:


Attachments
proposed fix (6.53 KB, patch)
2008-11-12 00:21 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.