Bug 57301 - close before open WebSocket doesn't fire close event
Summary: close before open WebSocket doesn't fire close event
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 23:18 PDT by Fumitoshi Ukai
Modified: 2011-05-24 01:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.32 KB, patch)
2011-03-28 23:41 PDT, Fumitoshi Ukai
no flags Details | Formatted Diff | Diff

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