RESOLVED INVALID 137831
WebSocket readyState should not throw an exception ever.
https://bugs.webkit.org/show_bug.cgi?id=137831
Summary WebSocket readyState should not throw an exception ever.
Brandon Andrews
Reported 2014-10-17 12:48:31 PDT
Webkit currently throws an exception if a handshake fails and the user attempts to access the readyState member. The following exception can be seen with Webkit's implementation when a handshake is interrupted: WebSocket connection to 'wss://example.com' failed: Connection closed before receiving a handshake response This should simply close the connection and set the readyState to CLOSED and call the onerror event. Having readyState throw an exception for this is unintuitive. (I don't think any other browser does this).
Attachments
Alexey Proskuryakov
Comment 1 2014-10-18 23:33:24 PDT
Could you please provide a test case? Looking at the readState attribute implementation, there is no way it could possibly raise an exception on getting. It doesn't even have a way to return an exception code: WebSocket::State WebSocket::readyState() const { return m_state; }
Alexey Proskuryakov
Comment 2 2014-10-21 19:23:06 PDT
Please feel free to re-open with a test case.
Note You need to log in before you can comment on or make changes to this bug.