[webkit-reviews] review granted: [Bug 117458] XMLHttpRequest performs too many copies for ArrayBuffer results : [Attachment 223087] Blink's implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 4 10:16:05 PST 2014


Alexey Proskuryakov <ap at webkit.org> has granted Wojciech Bielawski
<w.bielawski at samsung.com>'s request for review:
Bug 117458: XMLHttpRequest performs too many copies for ArrayBuffer results
https://bugs.webkit.org/show_bug.cgi?id=117458

Attachment 223087: Blink's implementation
https://bugs.webkit.org/attachment.cgi?id=223087&action=review

------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=223087&action=review


Nice!

> Source/WebCore/platform/SharedBuffer.cpp:279
> +    RefPtr<ArrayBuffer> arrayBuffer =
ArrayBuffer::createUninitialized(static_cast<unsigned>(size()), 1);

Nit: sizeof(char) would make this code slightly easier to read - with "1", most
people will need to open another file to check what createUninitialized()
arguments are.

>> Source/WebCore/platform/SharedBuffer.cpp:289
>> +	    ASSERT_NOT_REACHED();
> 
> I prefer RELEASE_ASSERT_NOT_REACHED().

We don't have a lot of these in WebCore, and I actually don't think that we
should. Unlike in JSC, many logic errors don't cause huge unintended
consequences such as security bugs, and it's better to have a web site with
some functionality broken than a WebProcess crash.

In this particular case, the failure is pretty benign - we essentially fail the
load, which could happen for other reasons, like a network failure.


More information about the webkit-reviews mailing list