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

Issue 700323003: Use Web IDL Union types in Service Worker's Cache interface (Closed)

Created:
6 years, 1 month ago by jsbell
Modified:
6 years, 1 month ago
Reviewers:
haraken, jkarlin, bashi
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, horo+watch_chromium.org
Project:
blink
Visibility:
Public.

Description

Use Web IDL Union types in Service Worker's Cache interface No more overloads! The method/methodImpl pattern could be further collapsed, but this seems like a good start while we work out kinks. The 'RequestInfo' typedef is from the fetch spec[1], also used in the ServiceWorker spec[2] to improve readability. [1] https://fetch.spec.whatwg.org/ [2] https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html BUG=240176 R=bashi@chromium.org,jkarlin@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185073

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : Enable building #

Patch Set 4 : fix copy/pasta #

Total comments: 3

Patch Set 5 : Eschew overloads #

Patch Set 6 : Fix union conversion fallback template logic #

Total comments: 3

Patch Set 7 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -124 lines) Patch
M Source/bindings/modules/v8/generated.gni View 1 2 3 1 chunk +2 lines, -4 lines 0 comments Download
M Source/bindings/modules/v8/generated.gypi View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M Source/bindings/templates/union.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/UnionTypesCore.cpp View 1 2 3 4 5 6 6 chunks +0 lines, -6 lines 0 comments Download
M Source/modules/serviceworkers/Cache.h View 3 chunks +10 lines, -13 lines 0 comments Download
M Source/modules/serviceworkers/Cache.cpp View 2 chunks +37 lines, -49 lines 0 comments Download
M Source/modules/serviceworkers/Cache.idl View 1 chunk +15 lines, -30 lines 0 comments Download
M Source/modules/serviceworkers/CacheTest.cpp View 1 2 3 4 9 chunks +32 lines, -18 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
jkarlin
So much nicer! lgtm with nit https://codereview.chromium.org/700323003/diff/60001/Source/modules/serviceworkers/CacheTest.cpp File Source/modules/serviceworkers/CacheTest.cpp (right): https://codereview.chromium.org/700323003/diff/60001/Source/modules/serviceworkers/CacheTest.cpp#newcode270 Source/modules/serviceworkers/CacheTest.cpp:270: RequestInfo toRequestInfo(const String& ...
6 years, 1 month ago (2014-11-06 16:59:45 UTC) #1
jsbell
bashi - failure: e:\b\build\slave\win_layout\build\src\out\debug\gen\blink\bindings\modules\v8\uniontypesmodules.cpp(67) :error C2220: warning treated as error - no 'object' file generated ...
6 years, 1 month ago (2014-11-06 17:00:06 UTC) #2
jsbell
https://codereview.chromium.org/700323003/diff/60001/Source/modules/serviceworkers/CacheTest.cpp File Source/modules/serviceworkers/CacheTest.cpp (right): https://codereview.chromium.org/700323003/diff/60001/Source/modules/serviceworkers/CacheTest.cpp#newcode270 Source/modules/serviceworkers/CacheTest.cpp:270: RequestInfo toRequestInfo(const String& value) On 2014/11/06 16:59:44, jkarlin wrote: ...
6 years, 1 month ago (2014-11-06 17:03:26 UTC) #3
jsbell
On 2014/11/06 17:00:06, jsbell wrote: > Note: no if test on the block containing the ...
6 years, 1 month ago (2014-11-06 17:39:34 UTC) #4
jsbell
Okay, looks green. No rush to get this in, but bashi@ and haraken@ - can ...
6 years, 1 month ago (2014-11-06 22:38:32 UTC) #6
bashi
On 2014/11/06 22:38:32, jsbell wrote: > Okay, looks green. > > No rush to get ...
6 years, 1 month ago (2014-11-06 23:26:03 UTC) #7
haraken
LGTM for bindings/. https://codereview.chromium.org/700323003/diff/100001/Source/bindings/templates/union.cpp File Source/bindings/templates/union.cpp (right): https://codereview.chromium.org/700323003/diff/100001/Source/bindings/templates/union.cpp#newcode136 Source/bindings/templates/union.cpp:136: exceptionState.throwTypeError("Not a valid union member."); I ...
6 years, 1 month ago (2014-11-07 00:06:36 UTC) #8
bashi
https://codereview.chromium.org/700323003/diff/100001/Source/bindings/templates/union.cpp File Source/bindings/templates/union.cpp (right): https://codereview.chromium.org/700323003/diff/100001/Source/bindings/templates/union.cpp#newcode136 Source/bindings/templates/union.cpp:136: exceptionState.throwTypeError("Not a valid union member."); On 2014/11/07 00:06:36, haraken ...
6 years, 1 month ago (2014-11-07 00:24:07 UTC) #9
haraken
https://codereview.chromium.org/700323003/diff/100001/Source/bindings/templates/union.cpp File Source/bindings/templates/union.cpp (right): https://codereview.chromium.org/700323003/diff/100001/Source/bindings/templates/union.cpp#newcode136 Source/bindings/templates/union.cpp:136: exceptionState.throwTypeError("Not a valid union member."); On 2014/11/07 00:24:07, bashi1 ...
6 years, 1 month ago (2014-11-07 01:15:33 UTC) #10
jsbell
Thanks everyone! FYI, I'm going to wait until after the M40 branch to land this.
6 years, 1 month ago (2014-11-07 16:58:03 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/700323003/120001
6 years, 1 month ago (2014-11-10 21:52:18 UTC) #13
commit-bot: I haz the power
6 years, 1 month ago (2014-11-10 22:59:13 UTC) #14
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as 185073

Powered by Google App Engine
This is Rietveld 408576698