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

Issue 1255933004: Service Worker: Correct Web IDL of FetchEvent.respondWith method. (Closed)

Created:
5 years, 5 months ago by jungkees
Modified:
5 years, 3 months ago
CC:
blink-reviews, jsbell, tzik, serviceworker-reviews, nhiroki, dglazkov+blink, kinuko+serviceworker, horo
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Service Worker: Correct Web IDL of FetchEvent.respondWith method. As per the spec, FetchEvent.respondWith() method's single argument should be of type Promise<Response>. When a Response object is given as an argument, Web IDL casts it to a promise via Promise.resolve. So this CL simply moves ScriptPromise::cast from Blink to V8 layer and does not change any behavior. Spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#respond-with-method Spec discussion: https://github.com/slightlyoff/ServiceWorker/issues/724 BUG=513972 Committed: https://crrev.com/d59b9e54578d473164b5f04dc4b4d147f9924e35 git-svn-id: svn://svn.chromium.org/blink/trunk@199499 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 #

Patch Set 2 : Change the argument name of respondWith in FetchEvent.idl #

Patch Set 3 : Update the title and the description of the layout test. #

Total comments: 2

Patch Set 4 : Use forward declaration instead of adding a header. #

Patch Set 5 : Rename IDL argument and method params. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -19 lines) Patch
A + LayoutTests/http/tests/serviceworker/fetch-event-respond-with-argument.html View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
A + LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html View 1 chunk +3 lines, -7 lines 2 comments Download
A LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-worker.js View 1 chunk +14 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/FetchEvent.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/FetchEvent.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/FetchEvent.idl View 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/RespondWithObserver.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/RespondWithObserver.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
jungkees
PTAL
5 years, 5 months ago (2015-07-25 12:42:50 UTC) #2
zino
On 2015/07/25 12:42:50, jungkees wrote: > PTAL l-g-t-m with nit.
5 years, 5 months ago (2015-07-25 21:28:34 UTC) #3
zino
l-g-t-m with nit. https://codereview.chromium.org/1255933004/diff/40001/Source/modules/serviceworkers/RespondWithObserver.h File Source/modules/serviceworkers/RespondWithObserver.h (right): https://codereview.chromium.org/1255933004/diff/40001/Source/modules/serviceworkers/RespondWithObserver.h#newcode8 Source/modules/serviceworkers/RespondWithObserver.h:8: #include "bindings/core/v8/ScriptPromise.h" nit: I think it ...
5 years, 5 months ago (2015-07-25 21:29:21 UTC) #4
jungkees
Thanks for the peer-review zino@. OWNERS, PTAL. https://codereview.chromium.org/1255933004/diff/40001/Source/modules/serviceworkers/RespondWithObserver.h File Source/modules/serviceworkers/RespondWithObserver.h (right): https://codereview.chromium.org/1255933004/diff/40001/Source/modules/serviceworkers/RespondWithObserver.h#newcode8 Source/modules/serviceworkers/RespondWithObserver.h:8: #include "bindings/core/v8/ScriptPromise.h" ...
5 years, 5 months ago (2015-07-26 08:37:40 UTC) #6
falken
Does this patch change any behavior? Anyway, it probably makes sense to make the IDL ...
5 years, 5 months ago (2015-07-27 00:44:41 UTC) #8
jungkees
On 2015/07/27 00:44:41, falken wrote: > Does this patch change any behavior? > No, it ...
5 years, 5 months ago (2015-07-27 01:20:33 UTC) #9
jungkees
Added a comment about adding null in the test. https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html File LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html (right): https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html#newcode39 LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html:39: ...
5 years, 5 months ago (2015-07-27 01:21:32 UTC) #10
yhirano
On 2015/07/27 00:44:41, falken wrote: > I'd like yhirano to take a look, there maybe ...
5 years, 4 months ago (2015-07-27 04:02:38 UTC) #11
yhirano
lgtm
5 years, 4 months ago (2015-07-27 05:50:38 UTC) #12
jungkees
On 2015/07/27 05:50:38, yhirano wrote: > lgtm Thanks for review yhirano@. falken@, can I just ...
5 years, 4 months ago (2015-07-27 06:22:09 UTC) #13
falken
yhirano lgtm is good for me
5 years, 4 months ago (2015-07-27 07:45:25 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1255933004/70001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1255933004/70001
5 years, 4 months ago (2015-07-27 07:49:26 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:70001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199499
5 years, 4 months ago (2015-07-27 08:32:25 UTC) #17
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 11:48:11 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/d59b9e54578d473164b5f04dc4b4d147f9924e35

Powered by Google App Engine
This is Rietveld 408576698