New issue
Advanced search Search tips

Issue 604910 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Remove Blob constructor overload (spec update)

Project Member Reported by jsb...@chromium.org, Apr 19 2016

Issue description

https://github.com/w3c/FileAPI/issues/33 proposes an accepted spec update for the Blob constructor, going from:

[Constructor, Constructor(sequence<...> blobParts, optional BlobPropertyBag options)] 

to:

[Constructor(optional sequence<...> blobParts, optional BlobPropertyBag options)]

We should attempt to make the update.

The behavior change is that `new Blob(undefined)` now works the same as `new Blob()` instead of throwing, which seems safe and desirable.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5

commit 7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5
Author: jsbell <jsbell@chromium.org>
Date: Thu Apr 21 17:40:31 2016

Make Blob constructor's first argument optional.

The spec previously had constructor overloads, allowing blobs to be
created with either `new Blob()` (no arguments) or `new Blob([data])`
(argument with array of blob parts). But unlike most APIs, calling as
`new Blob(undefined)` would throw, which is unexpected. The spec was
updated to remove the overload and make the first argument optional
instead.

A PR has been submitted to update web-platform-tests.

Spec: https://w3c.github.io/FileAPI/

BUG= 604910 
R=philipj@opera.com

Review URL: https://codereview.chromium.org/1896283002

Cr-Commit-Position: refs/heads/master@{#388806}

[modify] https://crrev.com/7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5/third_party/WebKit/LayoutTests/fast/files/blob-constructor-expected.txt
[modify] https://crrev.com/7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5/third_party/WebKit/LayoutTests/fast/files/blob-constructor.html
[modify] https://crrev.com/7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5/third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-constructor-expected.txt
[modify] https://crrev.com/7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5/third_party/WebKit/LayoutTests/platform/linux/imported/web-platform-tests/FileAPI/blob/Blob-constructor-expected.txt
[modify] https://crrev.com/7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5/third_party/WebKit/LayoutTests/platform/win/imported/web-platform-tests/FileAPI/blob/Blob-constructor-expected.txt
[modify] https://crrev.com/7dfcdc193f42dc9d5adfb4048fd0fc66c9f06bd5/third_party/WebKit/Source/core/fileapi/Blob.idl

Comment 2 by jsb...@chromium.org, Apr 21 2016

Status: Fixed (was: Started)
Components: Blink>Storage>FileAPI
Components: -Blink>FileAPI

Sign in to add a comment