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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 12 11:14:29 PST 2013


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





--- Comment #2 from Christophe Dumez <dchris at gmail.com>  2013-11-12 11:13:10 PST ---
(From update of attachment 216654)
View in context: https://bugs.webkit.org/attachment.cgi?id=216654&action=review

> Source/WebCore/bindings/js/JSBlobCustom.cpp:81
> +    } else if (firstArg.isObject()) {

The Web IDL specification says "Any kind of object except for a native Date object or a native RegExp object"
http://heycam.github.io/webidl/#es-sequence

You currently accept Date / RegExp objects which is against the spec and also does not match Blink's behavior.

Also, It might be a good idea to move this to a separate utility function since there are other places that need to handle sequences.

> LayoutTests/fast/files/blob-constructor-expected.txt:13
> +FAIL new Blob('hello') should throw TypeError: First argument of the constructor is not of type Array. Threw exception TypeError: First argument is not a sequence.

The test needs updating. Leaving them as FAIL is not a good idea.

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