Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Issue 1667213002: Don't expose nonstandard FileSystem API to Service Workers (Closed)

Created:
4 years, 10 months ago by jsbell
Modified:
4 years, 10 months ago
CC:
chromium-reviews, blink-reviews, kinuko+fileapi, nhiroki, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@work-bind
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't expose nonstandard FileSystem API to Service Workers Chrome's FileSystem API is deprecated/nonstandard and we should not expose it to new contexts like Service Workers. The fix ended up being a bit involved: * [Exposed] can't be used on members of partial interfaces defined in modules/ when the base interface is in core/ (see https://goo.gl/DfPWTV) * So instead split WorkerFileSystemGlobalScope into DedicateWorker... and SharedWorker... versions. * But that revealed a subtle bindings generator bug where an unused function would be generated for WorkerGlobalScopeConstructorAttributeSetterCallback due to the FileErrorConstructor attribute disappearing from WorkerGlobalScope. So fix that. * And that pointed out that the FileErrorConstructor shouldn't be exposed that way anyway, so expose that with [Exposed=(Window,Worker)] instead. * ... which correctly removes it from the CompositorWorker, which shouldn't have inherited it anyway because it has [Global=CompositorWorker] BUG=584052 Committed: https://crrev.com/8da767715a0035b7cd47e0cc8336c46db89295c7 Cr-Commit-Position: refs/heads/master@{#373842}

Patch Set 1 #

Patch Set 2 : Include parent changes #

Patch Set 3 : Add dedicated test, rebase webexposed #

Patch Set 4 : virtual/stable rebaselines #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -171 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/filesystem/workers/resolve-url-sync-expected.txt View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/no-filesystem.html View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/no-filesystem.js View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 2 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 2 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-compositor-worker-expected.txt View 1 1 chunk +0 lines, -15 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_interface.py View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/interface_base.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 1 1 chunk +0 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 1 chunk +0 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 1 chunk +0 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 1 chunk +0 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/fileapi/FileError.idl View 1 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/WebKit/Source/modules/filesystem/DedicatedWorkerGlobalScopeFileSystem.idl View 1 2 chunks +2 lines, -3 lines 0 comments Download
A + third_party/WebKit/Source/modules/filesystem/SharedWorkerGlobalScopeFileSystem.idl View 1 2 chunks +2 lines, -3 lines 0 comments Download
D third_party/WebKit/Source/modules/filesystem/WorkerGlobalScopeFileSystem.idl View 1 1 chunk +0 lines, -37 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 16 (6 generated)
jsbell
Please take a look? I could split the bindings codegen and FileError change out into ...
4 years, 10 months ago (2016-02-04 21:18:10 UTC) #3
haraken
bindings/ LGTM
4 years, 10 months ago (2016-02-04 23:58:29 UTC) #5
michaeln
this has never worked in serviceworkers, right? sanity modulo bindings voodoo generally lgtm ;)
4 years, 10 months ago (2016-02-05 01:10:27 UTC) #6
kinuko
Whoa, a bit of hassle. Thanks for fixing! lgtm
4 years, 10 months ago (2016-02-05 04:26:31 UTC) #7
philipj_slow
LGTM to unexposing this wherever possible. But shouldn't [Exposed=(Window,Worker)] expose on *Worker? It looks like ...
4 years, 10 months ago (2016-02-05 07:12:36 UTC) #8
jsbell
On 2016/02/05 07:12:36, philipj_UTC7 wrote: > LGTM to unexposing this wherever possible. But shouldn't > ...
4 years, 10 months ago (2016-02-05 17:10:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1667213002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1667213002/60001
4 years, 10 months ago (2016-02-05 17:11:37 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-05 17:56:56 UTC) #13
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/8da767715a0035b7cd47e0cc8336c46db89295c7 Cr-Commit-Position: refs/heads/master@{#373842}
4 years, 10 months ago (2016-02-05 17:58:18 UTC) #15
philipj_slow
4 years, 10 months ago (2016-02-05 19:28:40 UTC) #16
Message was sent while issue was closed.
On 2016/02/05 17:10:10, jsbell wrote:
> On 2016/02/05 07:12:36, philipj_UTC7 wrote:
> > LGTM to unexposing this wherever possible. But shouldn't
> > [Exposed=(Window,Worker)] expose on *Worker? It looks like that from
> > v8_utilities.py, at least. Would using
> > [Exposed=(Window,DedicatedWorker,SharedWorker)] achieve the same thing?
> 
> For FileError ? That's actually part of "File API" (although it's been removed
> from the spec in favor of just DOMError), and used in FileReader which is
> exposed to SW (for reading blobs, etc)
> 
> It should have been exposed to Worker all along; my guess is our impl predated
> [Exposed] since it's a VERY old Worker API.

Oh, right, FileError is used elsewhere :)

Powered by Google App Engine
This is Rietveld 408576698