[Webkit-unassigned] [Bug 124175] Blob constructor should accept sequences

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 13 21:20:54 PST 2013


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


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #216730|commit-queue?               |commit-queue+
               Flag|                            |




--- Comment #14 from Alexey Proskuryakov <ap at webkit.org>  2013-11-13 21:19:34 PST ---
(From update of attachment 216730)
View in context: https://bugs.webkit.org/attachment.cgi?id=216730&action=review

> Source/WebCore/bindings/js/JSBlobCustom.cpp:116
> +        JSValue item = blobParts->get(exec, i);

Can't get() throw an exception?

> Source/WebCore/bindings/js/JSBlobCustom.cpp:119
>          if (item.inherits(JSArrayBuffer::info()))
>              blobBuilder.append(toArrayBuffer(item));

This is not the best way to write this - toArrayBuffer will check the type again. I'd write

if (ArrayBuffer* arrayBuffer = toArrayBuffer(item))
    blobBuilder.append(arrayBuffer);

Same inefficiency is repeated below again.

-- 
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