Summary: | WebSocket: Receive binary message as ArrayBuffer | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yuta Kitamura <yutak> | ||||||
Component: | WebCore Misc. | Assignee: | Yuta Kitamura <yutak> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, ap, tkent, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 65249 | ||||||||
Attachments: |
|
Description
Yuta Kitamura
2011-08-29 23:06:25 PDT
Created attachment 105585 [details]
Patch
Comment on attachment 105585 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105585&action=review > LayoutTests/http/tests/websocket/tests/hybi/receive-arraybuffer.html:32 > +// Create an ArrayBuffer containing all distinct bytes ("\x00" to "\xFF"). > +function createAllBytesValue() nit: The comment is not so helpful because the function code is simple, and we can rename it to "createArrayBufferContainingAllDistinctBytes" > LayoutTests/http/tests/websocket/tests/hybi/workers/resources/receive-arraybuffer.js:16 > +// Create an ArrayBuffer containing all distinct bytes ("\x00" to "\xFF"). > +function createAllBytesValue() ditto. > Source/WebCore/websockets/WebSocket.cpp:419 > + RefPtr<ArrayBuffer> arrayBuffer = ArrayBuffer::create(binaryData->data(), binaryData->size()); > + dispatchEvent(MessageEvent::create(arrayBuffer.release())); The variable 'arrayBuffer' is not needed. Created attachment 105618 [details]
Patch v2
Comment on attachment 105585 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105585&action=review >> LayoutTests/http/tests/websocket/tests/hybi/receive-arraybuffer.html:32 >> +function createAllBytesValue() > > nit: The comment is not so helpful because the function code is simple, and we can rename it to "createArrayBufferContainingAllDistinctBytes" Fixed. Updated function names in receive-blob.html too. >> LayoutTests/http/tests/websocket/tests/hybi/workers/resources/receive-arraybuffer.js:16 >> +function createAllBytesValue() > > ditto. Fixed. >> Source/WebCore/websockets/WebSocket.cpp:419 >> + dispatchEvent(MessageEvent::create(arrayBuffer.release())); > > The variable 'arrayBuffer' is not needed. Fixed. Comment on attachment 105618 [details]
Patch v2
Looks ok.
Comment on attachment 105618 [details] Patch v2 Clearing flags on attachment: 105618 Committed r94161: <http://trac.webkit.org/changeset/94161> All reviewed patches have been landed. Closing bug. |