WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
32332
WebSocket events should be dispatched synchronously
https://bugs.webkit.org/show_bug.cgi?id=32332
Summary
WebSocket events should be dispatched synchronously
Alexey Proskuryakov
Reported
2009-12-09 11:15:59 PST
As per recent WhatWG discussion, everywhere the spec says "queue a task to dispatch an event", it actually means "dispatch the event synchronously". We should update the code accordingly, and make readyState checks in websocket/tests/simple test strict again.
Attachments
proposed patch
(5.58 KB, patch)
2009-12-09 13:51 PST
,
Alexey Proskuryakov
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ian 'Hixie' Hickson
Comment 1
2009-12-09 11:27:03 PST
(In reply to
comment #0
)
> As per recent WhatWG discussion, everywhere the spec says "queue a task to > dispatch an event", it actually means "dispatch the event synchronously".
That's only true if the code that would be queueing the task is itself a task that was queued. In which case, the task in question is simply the task that was queued. (In other words, it's not the case if the code that would be dispatching the event is actually running on another thread.) That is, where the spec says: On another thread, if X, queue a task on the main thread that does Y and Z. ...it is fine to implement this as: Queue a task on the main thread that, if X, does Y and Z. ...but it's not fine to implement it as: On another thread, if X, do Y and Z. The spec has changed to make the readyState attribute change at the same time as the events are dispatched (as part of the same task).
Alexey Proskuryakov
Comment 2
2009-12-09 11:31:49 PST
In WebKit, all code that handles events from network layer is "a task that was queued". I suspect that's true of most/all other browser engines.
Alexey Proskuryakov
Comment 3
2009-12-09 13:51:42 PST
Created
attachment 44560
[details]
proposed patch Ian, do the ChangeLog comment and test changes look right?
WebKit Review Bot
Comment 4
2009-12-09 13:56:11 PST
style-queue ran check-webkit-style on
attachment 44560
[details]
without any errors.
Alexey Proskuryakov
Comment 5
2009-12-09 19:33:08 PST
Committed revision 51935.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug