Closed Bug 785093 Opened 13 years ago Closed 13 years ago

Blob constructors are incorrect

Categories

(Core :: DOM: Core & HTML, defect)

14 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID
mozilla15

People

(Reporter: info, Unassigned)

Details

My system: - Ubuntu 10.04 - 64 bit - Firefox 14.0.1 ( http://download.mozilla.org/?product=firefox-14.0.1&os=linux&lang=en-US ) The spec for the FileAPI says for the Blob-constructor: * ArrayBufferView [TypedArrays] array elements * Blob array elements * DOMString [WebIDL] array elements http://www.w3.org/TR/FileAPI/#dfn-blobParts Due to this, i wrote a simple test (see the console): http://localhost/test/blob.html The Result: Creating a Blob * from String - works correct * from Blob - failes with "Illegal value" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" * from ArrayBufferView (Uint8Array) failes with "An attempt was made to use an object that is not, or is no longer, usable" * from ArrayBuffer works, but it shouldn't
Whops, localhost will not work: Here the sample code: http://www.dennis-boldt.de/test/blob
ArrayBufferView will work in Firefox 15; see bug 752402. This was a recent (after development of Firefox 14 was done) spec change. I believe the "ArrayBuffer should not work" bit is a spec bug (again, see discussion in bug 752402). Not sure whether that's filed, though. Code inspection suggests that passing a Blob should work. Could you attach a testcase in which it doesn't? The above localhost link isn't all that usable. ;)
Assignee: general → nobody
Severity: major → normal
Component: JavaScript Engine → DOM
(In reply to Boris Zbarsky (:bz) from comment #3) > I believe the "ArrayBuffer should not work" bit is a spec bug (again, see > discussion in bug 752402). Not sure whether that's filed, though. It isn't.
I forgot the squared brackets in the "from Blob" test case. It works now. Thanks.
Thanks for double-checking that!
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.