Chromium bug entry: http://code.google.com/p/chromium/issues/detail?id=159568 The WebSocket API specification has changed. When a message of send() (or a reason of close()) has unpaired surrogates, they should be replaced with replacement character (U+FFFE), instead of throwing SYNTAX_ERR. Specification diff: http://html5.org/tools/web-apps-tracker?from=7083&to=7084 How to use replacement character: http://dev.w3.org/2006/webapi/WebIDL/#dfn-obtain-unicode The current WebKit throws SYNTAX_ERR. Following w3c-test is failing because of this behavior: http://www.w3c-test.org/webapps/WebSockets/tests/submissions/Microsoft/Send-Unpaired-Surrogates.htm
Created attachment 172980 [details] Patch
Comment on attachment 172980 [details] Patch Attachment 172980 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/14759745
Created attachment 173006 [details] Patch
Comment on attachment 173006 [details] Patch This is generic UTF-8 manipulation code, it should be in WTF, not in WebSocket files. Also, I'm not sure why we need two passes now.
(In reply to comment #4) > (From update of attachment 173006 [details]) > This is generic UTF-8 manipulation code, it should be in WTF, not in WebSocket files. I see. The code would be able to merge with String::utf8(). I'll create a separate bug entry for it. > Also, I'm not sure why we need two passes now. m_channel can be null in WebSocketChannel::close() so we need to check the length of reason in utf-8 at WebSocket::close().
Created attachment 173505 [details] Patch
Hi Alexey, Could you take another look?
Comment on attachment 173505 [details] Patch Thanks!
Comment on attachment 173505 [details] Patch Clearing flags on attachment: 173505 Committed r134515: <http://trac.webkit.org/changeset/134515>
All reviewed patches have been landed. Closing bug.