[Webkit-unassigned] [Bug 117458] XMLHttpRequest performs too many copies for ArrayBuffer results

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


https://bugs.webkit.org/show_bug.cgi?id=117458


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #223087|review?                     |review+
               Flag|                            |




--- Comment #13 from Alexey Proskuryakov <ap at webkit.org>  2014-02-04 10:13:27 PST ---
(From update of attachment 223087)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list