Bug 90536

Summary: XHR.send should support ArrayBufferView
Product: WebKit Reporter: Kinuko Yasuda <kinuko>
Component: WebCore Misc.Assignee: Kinuko Yasuda <kinuko>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, haraken, japhet, jochen, kbr, ojan, webkit.review.bot, yutak
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 85961    
Attachments:
Description Flags
Patch
kbr: review+
for submit
none
for submit (fixed histogram name) none

Description Kinuko Yasuda 2012-07-04 02:42:42 PDT
XHR.send should support ArrayBufferView and also eventually deprecate ArrayBuffer
Comment 1 Kinuko Yasuda 2012-07-04 02:46:43 PDT
Created attachment 150748 [details]
Patch
Comment 2 Kenneth Russell 2012-07-04 08:41:15 PDT
Comment on attachment 150748 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=150748&action=review

Looks good overall. A couple of minor comments which you can fix upon landing. r=me

> Source/WebCore/xml/XMLHttpRequest.cpp:661
> +    HistogramSupport::histogramEnumeration("WebCore.XHR.send.ArrayBufferView", XMLHttpRequestSendArrayBuffer, XMLHttpRequestSendArrayBufferEnumMax);

The naming of this histogram is a little confusing. Consider naming it something like send.ArrayBufferOrView, here and below.

> Source/WebCore/xml/XMLHttpRequest.cpp:686
> +    }

This code is essentially duplicated; please consider factoring it and the body of send(ArrayBuffer, ...) into a helper method taking (void*, unsigned) as arguments.
Comment 3 Kinuko Yasuda 2012-07-06 00:19:11 PDT
Created attachment 151025 [details]
for submit
Comment 4 Kinuko Yasuda 2012-07-06 00:48:21 PDT
Created attachment 151027 [details]
for submit (fixed histogram name)
Comment 5 Kenneth Russell 2012-07-06 10:40:29 PDT
Comment on attachment 151027 [details]
for submit (fixed histogram name)

Looks good. r=me (even though this one wasn't marked r?)
Comment 6 WebKit Review Bot 2012-07-08 20:09:26 PDT
Comment on attachment 151027 [details]
for submit (fixed histogram name)

Clearing flags on attachment: 151027

Committed r122074: <http://trac.webkit.org/changeset/122074>
Comment 7 Yuta Kitamura 2012-07-11 00:51:31 PDT
Seems like we can close this bug as resolved.