WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
61115
WebSocket: Refactor WebSocket error reports
https://bugs.webkit.org/show_bug.cgi?id=61115
Summary
WebSocket: Refactor WebSocket error reports
Yuta Kitamura
Reported
2011-05-19 01:19:24 PDT
Currently, the codes that report WebSocket errors to JavaScript console are scaterred among various places in WebCore. This sounds ad-hoc, and could be improved. We could add a function to WebSocketChannel (and ThreadableWebSocketChannel, WorkerThreadableWebSocketChannel) that corresponds to "fail the WebSocket connection" algorithm in the WebSocket protocol specification (*1), like: class WebSocketChannel { ... void fail(const String& errorMessage); // Log the error to JavaScript console, and do close(). ... }; ... and use it in places where we need to "fail the WebSocket connection". I think this change will make the code more readable and easier to track. (*1) In the WebSocket protocol specification, an algorithm called "fail the WebSocket connection" is defined:
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00#section-6.1
Certain algorithms require the user agent to *fail the WebSocket connection*. To do so, the user agent must close the WebSocket connection, and may report the problem to the user (which would be especially useful for developers).
Attachments
Add attachment
proposed patch, testcase, etc.
Yuta Kitamura
Comment 1
2011-06-02 01:23:34 PDT
This is done!
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