[Webkit-unassigned] [Bug 86958] [WebSocket] WebSocket object should fire a simple event named error when it is required to fail the websocket connection.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 21 22:37:56 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=86958





--- Comment #3 from Yuta Kitamura <yutak at chromium.org>  2012-05-21 22:37:00 PST ---
Seems like the spec changed at http://html5.org/tools/web-apps-tracker?from=6376&to=6377
(see also https://www.w3.org/Bugs/Public/show_bug.cgi?id=13294)

As Takashi said, I think you just need to call didReceiveMessageError() in fail(). You don't have to add a new function to WebSocketChannelClient.

You probably need to have a line like "RefPtr<WebSocketChannel> protect;" before calling didReceiveMessageError(), otherwise this function may cause the channel to get removed (because users may do "ws.close()" in onerror handler).

Also, you might need to change the definition of didReceiveMessageError() to let it fire the event when the state is not OPEN or CLOSING. This is old code based on the old API spec, and I guess this restriction is leftover from the old age.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list