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

Issue 318393002: Initial implementation of ServiceWorkerGlobalScope.fetch() (Closed)

Created:
6 years, 6 months ago by horo
Modified:
6 years, 6 months ago
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, nhiroki, falken, kinuko+serviceworker, horo+watch_chromium.org, alecflett+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Initial implementation of ServiceWorkerGlobalScope.fetch() BUG=373120 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176186

Patch Set 1 #

Total comments: 18

Patch Set 2 : incoroporated dominicc's comment #

Total comments: 2

Patch Set 3 : incorporated yhirano's comment #

Patch Set 4 : incorporated tyoshino's comment #

Total comments: 2

Patch Set 5 : Add fetch LayoutTest #

Total comments: 18

Patch Set 6 : incorporated yhirano's comment #

Total comments: 2

Patch Set 7 : incorporated yhirano and tyoshino's comment #

Total comments: 2

Patch Set 8 : Incorporated tyoshino's comment and added fetch test. #

Patch Set 9 : update test files #

Total comments: 12

Patch Set 10 : Incorporated tyoshino's comment #

Patch Set 11 : rebase #

Patch Set 12 : rebase #

Patch Set 13 : add virtual/serviceworker/http/tests/serviceworker/fetch-expected.txt #

Patch Set 14 : Add test for destroying the execution context while fetch is happening. #

Total comments: 4

Patch Set 15 : rebase only #

Patch Set 16 : incoroporated dominicc's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -16 lines) Patch
A + LayoutTests/http/tests/serviceworker/fetch.html View 1 2 3 4 5 6 7 1 chunk +9 lines, -13 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/fetch-event.html View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/fetch-event-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/fetch-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/fetch-event-test-worker.js View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/fetch-worker.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/serviceworker/resources/other.html View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/virtual/serviceworker/http/tests/serviceworker/fetch-event-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + LayoutTests/virtual/serviceworker/http/tests/serviceworker/fetch-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M Source/core/workers/WorkerGlobalScope.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/workers/WorkerThread.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/FetchManager.h View 1 2 3 4 5 6 1 chunk +36 lines, -0 lines 0 comments Download
A Source/modules/serviceworkers/FetchManager.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +172 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/Request.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/Request.cpp View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.h View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +28 lines, -0 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl View 4 5 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
horo
yhirano@, tyoshino@ Could you please review? I'm not so familiar with loader codes now. So ...
6 years, 6 months ago (2014-06-09 09:16:08 UTC) #1
dominicc (has gone to gerrit)
I would love to see the tests for this, including destroying the execution context while ...
6 years, 6 months ago (2014-06-09 20:11:00 UTC) #2
horo
We don't have the way to terminate the service worker in LayoutTests. So we should ...
6 years, 6 months ago (2014-06-10 03:34:52 UTC) #3
yhirano
https://codereview.chromium.org/318393002/diff/1/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/1/Source/modules/serviceworkers/FetchManager.cpp#newcode81 Source/modules/serviceworkers/FetchManager.cpp:81: m_resolver.clear(); Is this clear needed? https://codereview.chromium.org/318393002/diff/1/Source/modules/serviceworkers/FetchManager.cpp#newcode115 Source/modules/serviceworkers/FetchManager.cpp:115: m_resolver->reject(DOMError::create(InvalidStateError)); DOMException? ...
6 years, 6 months ago (2014-06-10 04:57:54 UTC) #4
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/318393002/diff/40001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp File Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp (right): https://codereview.chromium.org/318393002/diff/40001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp#newcode84 Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp:84: KURL url = completeURL(urlstring); if (!url.isValid()) throw TypeError
6 years, 6 months ago (2014-06-10 05:18:38 UTC) #5
horo
https://codereview.chromium.org/318393002/diff/1/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/1/Source/modules/serviceworkers/FetchManager.cpp#newcode81 Source/modules/serviceworkers/FetchManager.cpp:81: m_resolver.clear(); On 2014/06/10 04:57:53, yhirano wrote: > Is this ...
6 years, 6 months ago (2014-06-10 06:20:46 UTC) #6
horo
https://codereview.chromium.org/318393002/diff/40001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp File Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp (right): https://codereview.chromium.org/318393002/diff/40001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp#newcode84 Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp:84: KURL url = completeURL(urlstring); On 2014/06/10 05:18:38, tyoshino wrote: ...
6 years, 6 months ago (2014-06-10 06:44:59 UTC) #7
tyoshino (SeeGerritForStatus)
On 2014/06/10 03:34:52, horo wrote: > We don't have the way to terminate the service ...
6 years, 6 months ago (2014-06-11 04:57:39 UTC) #8
dominicc (has gone to gerrit)
On Jun 10, 2014 9:57 PM, <tyoshino@chromium.org> wrote: > > On 2014/06/10 03:34:52, horo wrote: ...
6 years, 6 months ago (2014-06-11 06:40:16 UTC) #9
yhirano
lgtm Please use FIXME rather than TODO. https://codereview.chromium.org/318393002/diff/1/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/1/Source/modules/serviceworkers/FetchManager.cpp#newcode129 Source/modules/serviceworkers/FetchManager.cpp:129: m_resolver.clear(); On ...
6 years, 6 months ago (2014-06-11 06:51:30 UTC) #10
horo
https://codereview.chromium.org/318393002/diff/80001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp File Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp (right): https://codereview.chromium.org/318393002/diff/80001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp#newcode85 Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp:85: if (!url.isValid()) { On 2014/06/11 06:51:30, yhirano wrote: > ...
6 years, 6 months ago (2014-06-11 09:06:23 UTC) #11
yhirano
https://codereview.chromium.org/318393002/diff/120001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp File Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp (right): https://codereview.chromium.org/318393002/diff/120001/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp#newcode93 Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp:93: RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); [opt] You can use ScriptPromise::reject, ...
6 years, 6 months ago (2014-06-11 09:10:49 UTC) #12
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp#newcode84 Source/modules/serviceworkers/FetchManager.cpp:84: failed(); I suggest that you have a flag e.g. ...
6 years, 6 months ago (2014-06-11 09:12:01 UTC) #13
horo
https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp#newcode84 Source/modules/serviceworkers/FetchManager.cpp:84: failed(); On 2014/06/11 09:12:01, tyoshino wrote: > I suggest ...
6 years, 6 months ago (2014-06-11 11:22:12 UTC) #14
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp#newcode126 Source/modules/serviceworkers/FetchManager.cpp:126: m_resolver->reject(DOMException::create(NetworkError)); On 2014/06/11 11:22:11, horo wrote: > On 2014/06/11 ...
6 years, 6 months ago (2014-06-12 03:27:24 UTC) #15
horo
https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/100001/Source/modules/serviceworkers/FetchManager.cpp#newcode126 Source/modules/serviceworkers/FetchManager.cpp:126: m_resolver->reject(DOMException::create(NetworkError)); On 2014/06/12 03:27:24, tyoshino wrote: > On 2014/06/11 ...
6 years, 6 months ago (2014-06-12 05:21:16 UTC) #16
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/318393002/diff/200001/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/200001/Source/modules/serviceworkers/FetchManager.cpp#newcode8 Source/modules/serviceworkers/FetchManager.cpp:8: #include "bindings/v8/ScriptPromiseResolverWithContext.h" include bindings/v8/ScriptState.h https://codereview.chromium.org/318393002/diff/200001/Source/modules/serviceworkers/FetchManager.cpp#newcode9 Source/modules/serviceworkers/FetchManager.cpp:9: #include "core/dom/DOMException.h" ...
6 years, 6 months ago (2014-06-12 07:38:20 UTC) #17
horo
https://codereview.chromium.org/318393002/diff/200001/Source/modules/serviceworkers/FetchManager.cpp File Source/modules/serviceworkers/FetchManager.cpp (right): https://codereview.chromium.org/318393002/diff/200001/Source/modules/serviceworkers/FetchManager.cpp#newcode8 Source/modules/serviceworkers/FetchManager.cpp:8: #include "bindings/v8/ScriptPromiseResolverWithContext.h" On 2014/06/12 07:38:19, tyoshino wrote: > include ...
6 years, 6 months ago (2014-06-12 08:32:55 UTC) #18
horo
dominicc@ Could you please review this again? Thank you.
6 years, 6 months ago (2014-06-12 09:02:35 UTC) #19
horo
On 2014/06/10 03:34:52, horo wrote: > We don't have the way to terminate the service ...
6 years, 6 months ago (2014-06-13 04:22:34 UTC) #20
horo
dominicc@ Ping?
6 years, 6 months ago (2014-06-16 05:27:25 UTC) #21
dominicc (has gone to gerrit)
LGTM You will need falken for OWNERs I think? https://codereview.chromium.org/318393002/diff/300001/LayoutTests/http/tests/serviceworker/resources/fetch-worker.js File LayoutTests/http/tests/serviceworker/resources/fetch-worker.js (right): https://codereview.chromium.org/318393002/diff/300001/LayoutTests/http/tests/serviceworker/resources/fetch-worker.js#newcode31 LayoutTests/http/tests/serviceworker/resources/fetch-worker.js:31: ...
6 years, 6 months ago (2014-06-16 06:07:50 UTC) #22
horo
According to Chromite Butler, we seems to be able to commit this cl. https://codereview.chromium.org/318393002/diff/300001/LayoutTests/http/tests/serviceworker/resources/fetch-worker.js File ...
6 years, 6 months ago (2014-06-16 06:32:18 UTC) #23
horo
The CQ bit was checked by horo@chromium.org
6 years, 6 months ago (2014-06-16 06:32:25 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/horo@chromium.org/318393002/330001
6 years, 6 months ago (2014-06-16 06:32:42 UTC) #25
commit-bot: I haz the power
6 years, 6 months ago (2014-06-16 08:22:29 UTC) #26
Message was sent while issue was closed.
Change committed as 176186

Powered by Google App Engine
This is Rietveld 408576698