Summary: | WebSocket.send() should accept ArrayBufferView | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yuta Kitamura <yutak> | ||||||||
Component: | WebCore Misc. | Assignee: | Yuta Kitamura <yutak> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, ap, haraken, japhet, jochen, ojan, tkent, webkit.review.bot | ||||||||
Priority: | P2 | Keywords: | WebExposed | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 85961 | ||||||||||
Attachments: |
|
Description
Yuta Kitamura
2012-07-10 06:22:15 PDT
Created attachment 151637 [details]
Patch
Comment on attachment 151637 [details] Patch (Drive-by comment) View in context: https://bugs.webkit.org/attachment.cgi?id=151637&action=review > Source/WebCore/Modules/websockets/WebSocket.cpp:294 > + return m_channel->send(*binaryData, 0, binaryData->byteLength()) == ThreadableWebSocketChannel::SendSuccess; Might be nicer to show deprecation warning message (and optionally collect metrics) if ArrayBuffer is given as well as we do in Blob constructor and XHR.send? Created attachment 151861 [details]
Patch v2
Comment on attachment 151637 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151637&action=review >> Source/WebCore/Modules/websockets/WebSocket.cpp:294 >> + return m_channel->send(*binaryData, 0, binaryData->byteLength()) == ThreadableWebSocketChannel::SendSuccess; > > Might be nicer to show deprecation warning message (and optionally collect metrics) if ArrayBuffer is given as well as we do in Blob constructor and XHR.send? Thanks, I added these in patch v2. Comment on attachment 151861 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=151861&action=review > Source/WebCore/ChangeLog:16 > + Also, histogram metrics collection is added in WebSocket.send() to keep track of > + the usage of WebSocket.send() family. This can be a separated patch. Comment on attachment 151861 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=151861&action=review http://dev.w3.org/html5/websockets/ WebSocket API draft was updated and now it includes *both* send(ArrayBuffer) and send(ArrayBufferView). So, deprecation warning for send(ArrayBuffer) does not make sense, thus I'm going to update the patch to remove it. >> Source/WebCore/ChangeLog:16 >> + the usage of WebSocket.send() family. > > This can be a separated patch. Will be removed. Created attachment 156830 [details]
Patch v3
Comment on attachment 156830 [details]
Patch v3
Looks good.
Comment on attachment 156830 [details] Patch v3 Clearing flags on attachment: 156830 Committed r124846: <http://trac.webkit.org/changeset/124846> All reviewed patches have been landed. Closing bug. |