Bug 57301

Summary: close before open WebSocket doesn't fire close event
Product: WebKit Reporter: Fumitoshi Ukai <ukai>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch none

Description Fumitoshi Ukai 2011-03-28 23:18:33 PDT
If it opens WebSocket and close in the same context (before receiving open event), it misses firing close event.

var ws = new WebSocket(wsUrl);
ws.onclose = function() { alert("closed"); }
ws.close();
Comment 1 Fumitoshi Ukai 2011-03-28 23:41:56 PDT
Created attachment 87269 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-05-23 14:57:19 PDT
ap, abarth?  It's been a month, this one looks like an easy review.
Comment 3 Adam Barth 2011-05-23 14:59:43 PDT
Comment on attachment 87269 [details]
Patch

Ok.
Comment 4 Alexey Proskuryakov 2011-05-23 15:09:26 PDT
Sorry, overlooked it. Looks good to me, too - thanks for fixing this!
Comment 5 Fumitoshi Ukai 2011-05-24 01:11:11 PDT
Comment on attachment 87269 [details]
Patch

Clearing flags on attachment: 87269

Committed r87135: <http://trac.webkit.org/changeset/87135>
Comment 6 Fumitoshi Ukai 2011-05-24 01:11:17 PDT
All reviewed patches have been landed.  Closing bug.