New issue
Advanced search Search tips

Issue 604951 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

URL.createObjectURL and URL.revokeObjectURL should not be exposed in Service Workers

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

Issue description

Per FileAPI:
https://w3c.github.io/FileAPI/#creating-revoking

change: https://github.com/w3c/FileAPI/commit/b9c2275df53cf3a808f1f272f3d6134d1b920549

URL.createObjectURL and URL.revokeObjectURL should not be exposed in Service Workers.
 

Comment 1 by jsb...@chromium.org, Apr 20 2016

I attempted to do this by marking the methods [Exposed=...] but ran into a linking issue since there are partials that override in modules (URLMediaSource, URLMediaStream). I tried introducing a URLFileAPI.idl partial with [Exposed] but the [Exposed] was ignored. All the permutations I tried marking the methods with [Exposed] lead to the same linker error:

gen/blink/bindings/modules/v8/V8URLPartial.cpp:41: error: undefined reference to 'blink::V8URL::preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, blink::DOMWrapperWorld const&, v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8::FunctionTemplate>)'

Maybe someone can beat me to a fix.

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

Components: Blink>FileAPI

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

re: the linking issue: looks like we just need {{export}} on preparePrototypeAndInterfaceObject in the interface template.

Comment 4 by jsb...@chromium.org, Apr 22 2016

Owner: jsb...@chromium.org
Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 26 2016

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

commit 05189372a88e4cac7b81080886bcb11b6817aab2
Author: jsbell <jsbell@chromium.org>
Date: Tue Apr 26 17:07:57 2016

Factor File API's 'partial interface URL' impl into separate files

Preliminary CL for tackling changing the [Exposed] attributes for the
partials, split the URL methods defined in FileAPI [1] out into their
own implementation files. Also update bindings template to ensure the
method supporting the partial interface / static method / conditional
exposure combination was exported for use in modules.

No behavior changes.

[1] https://w3c.github.io/FileAPI/#creating-revoking

BUG= 604951 
R=haraken@chromium.org

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

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

[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/templates/interface.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/core/dom/DOMURL.cpp
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/core/dom/DOMURL.h
[modify] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/core/dom/URL.idl
[add] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
[add] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/core/fileapi/URLFileAPI.h
[add] https://crrev.com/05189372a88e4cac7b81080886bcb11b6817aab2/third_party/WebKit/Source/core/fileapi/URLFileAPI.idl

Labels: Merge-Request-51
Status: Fixed (was: Started)
Request to merge the deprecation to M51, so we can do the actual removal of these methods in M52. See Intent Thread for details:

https://groups.google.com/a/chromium.org/d/msg/blink-dev/HuA7Ng9U0oc/CYvfMoeyBwAJ

(marking "Fixed" so it'll show up on the Merge-Request radar, although the removal is NYI)
Is the merge request only for c#6, which is the deprecation warning change?
Yes, although it won't be a simple merge since since one of the files (URLFileAPI.cpp) was factored out in #c5. The change there will need to be applied to DOMURL.cpp instead. 

Comment 10 by tin...@google.com, May 6 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 11 by bugdroid1@chromium.org, May 6 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/364169fce92dc76d0e96b2c0970237cad179eb96

commit 364169fce92dc76d0e96b2c0970237cad179eb96
Author: Joshua Bell <jsbell@chromium.org>
Date: Fri May 06 23:49:32 2016

Deprecate URL.createObjectURL/revokeObjectURL in Service Workers

As a prelude to removal of these methods, slip a deprecation warning in.

Intent Thread: https://groups.google.com/a/chromium.org/d/msg/blink-dev/HuA7Ng9U0oc/CYvfMoeyBwAJ

BUG= 604951 
R=rbyers@chromium.org,mpearson@chromium.org

Review-Url: https://codereview.chromium.org/1938183002
Cr-Commit-Position: refs/heads/master@{#391951}
(cherry picked from commit 0ac96023be4cd86fec7404752ea61c7d6ede5ab0)

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

Cr-Commit-Position: refs/branch-heads/2704@{#436}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/364169fce92dc76d0e96b2c0970237cad179eb96/third_party/WebKit/Source/core/dom/DOMURL.cpp
[modify] https://crrev.com/364169fce92dc76d0e96b2c0970237cad179eb96/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/364169fce92dc76d0e96b2c0970237cad179eb96/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/364169fce92dc76d0e96b2c0970237cad179eb96/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp
[modify] https://crrev.com/364169fce92dc76d0e96b2c0970237cad179eb96/third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp
[modify] https://crrev.com/364169fce92dc76d0e96b2c0970237cad179eb96/tools/metrics/histograms/histograms.xml

Project Member

Comment 12 by bugdroid1@chromium.org, May 12 2016

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

commit 9e232c512c962a7aecc85e07f7a48a4735dc7a25
Author: jsbell <jsbell@chromium.org>
Date: Thu May 12 16:38:57 2016

Don't expose URL.createObjectURL and revokeObjectURL to Service Workers

Per FileAPI[1] which was updated based on Service Worker discussion[2],
minting blob URLs should not be possible within SWs.

A bug has been filed against MediaSource[3] to update the IDL there
(following the same logic), and mediastream's createObjectURL is no
longer present in the standard. Regardless, the overloads should
never execute in Service Workers as those types (MediaStream,
MediaSource) are not exposed in that context.

Note that the [Exposed] attributes are applied directly to the
interface members as they appear to be ignored on the partial
interface. (Bug?)

[1] https://w3c.github.io/FileAPI/#creating-revoking
[2] https://github.com/slightlyoff/ServiceWorker/issues/688
[3] https://github.com/w3c/media-source/issues/67

Intent Thread: https://groups.google.com/a/chromium.org/d/msg/blink-dev/HuA7Ng9U0oc/CYvfMoeyBwAJ

BUG= 604951 , 608460 

Review-Url: https://codereview.chromium.org/1908263002
Cr-Commit-Position: refs/heads/master@{#393271}

[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/fetch.js
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/thorough/scheme-blob.js
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/Source/core/fileapi/URLFileAPI.cpp
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/Source/core/fileapi/URLFileAPI.idl
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/Source/core/frame/Deprecation.cpp
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/Source/modules/mediasource/URLMediaSource.idl
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp
[modify] https://crrev.com/9e232c512c962a7aecc85e07f7a48a4735dc7a25/third_party/WebKit/Source/modules/mediastream/URLMediaStream.idl

Components: Blink>Storage>FileAPI
Components: -Blink>FileAPI

Sign in to add a comment