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
Does this patch change any behavior?
Anyway, it probably makes sense to make the IDL more closely match the spec
(which is Response or Promise<Response>) now.
I'd like yhirano to take a look, there maybe a reason we did "any" instead of
"Promise<Response>"
https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/...
File
LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html
(right):
https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/...
LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html:39:
{ name: 'other-value', expect_load: false },
'object' or 'object-instance' seems more clear than 'other-value'
Would it make sense to add a test for 'null' just for more completeness?
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
On 2015/07/27 00:44:41, falken wrote:
> Does this patch change any behavior?
>
No, it doesn't change any behavior. ScriptPromise::cast simply moves from Blink
to V8 layer.
> Anyway, it probably makes sense to make the IDL more closely match the spec
> (which is Response or Promise<Response>) now.
>
This is the very reason I started this CL. The IDL that you quoted has just been
changed to (Promise<Response>) based on this discussion:
https://github.com/slightlyoff/ServiceWorker/issues/724. (According to the
discussion, the previous union types were something wrong in terms of the Web
IDL definition.)
> I'd like yhirano to take a look, there maybe a reason we did "any" instead of
> "Promise<Response>"
>
>
https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/...
> File
>
LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html
> (right):
>
>
https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/...
>
LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html:39:
> { name: 'other-value', expect_load: false },
> 'object' or 'object-instance' seems more clear than 'other-value'
>
> Would it make sense to add a test for 'null' just for more completeness?
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
Added a comment about adding null in the test.
https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/...
File
LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html
(right):
https://codereview.chromium.org/1255933004/diff/70001/LayoutTests/http/tests/...
LayoutTests/http/tests/serviceworker/resources/fetch-event-respond-with-argument-iframe.html:39:
{ name: 'other-value', expect_load: false },
IMO, any single case which is neither a Response nor a Promise<Response> is
enough here as it merely turns to something like Promise.resolve(value). Then
the promise gets through the existing implementation where other than a valid
Response object will end up with a network error.
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
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
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
Reviewers: lgombos, zino, falken, kinuko, nhiroki, michaeln, yhirano
Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Comments: 4