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

Issue 2119143002: service worker: Wait for inflight requests before activating (Closed)

Created:
4 years, 5 months ago by falken
Modified:
4 years, 5 months ago
Reviewers:
kinuko, bkelly, nhiroki
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

service worker: Wait for inflight requests before activating This patch makes changes as per discussion at https://github.com/slightlyoff/ServiceWorker/issues/916 Namely, * The waiting worker gets promoted to active once there are no controllees and the incumbent worker has no in-flight events (fetch/sync/push/message etc). * skipWaiting bypasses the no controllees requirement, but we still wait until there are no in-flight events. * As usual, incoming fetch/sync/push events always go to the active worker. BUG=616331 Committed: https://crrev.com/6c95b0ff8f694cda918e38c96387e5445713fc8e Cr-Commit-Position: refs/heads/master@{#405628}

Patch Set 1 #

Patch Set 2 : wip #

Patch Set 3 : private #

Total comments: 2

Patch Set 4 : wanderview #

Patch Set 5 : rebase #

Total comments: 9

Patch Set 6 : nhiroki-san #

Total comments: 22

Patch Set 7 : rebase #

Patch Set 8 : comments #

Total comments: 2

Patch Set 9 : reg #

Messages

Total messages: 33 (13 generated)
falken
nhiroki: PTAL bkelly: FYI, you might want to look at the WPT tests
4 years, 5 months ago (2016-07-07 05:56:54 UTC) #3
bkelly
Overall the tests look really good. Thanks! I just had one comment about avoiding setTimeout(). ...
4 years, 5 months ago (2016-07-07 13:48:08 UTC) #4
falken
Thanks! https://codereview.chromium.org/2119143002/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html (right): https://codereview.chromium.org/2119143002/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html#newcode59 third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html:59: return new Promise(resolve => setTimeout(resolve, 0)); On 2016/07/07 ...
4 years, 5 months ago (2016-07-08 03:36:19 UTC) #5
falken
> Do you expect to uplift this or should I pull into the wpt tree ...
4 years, 5 months ago (2016-07-08 03:38:00 UTC) #6
nhiroki
https://codereview.chromium.org/2119143002/diff/80001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/2119143002/diff/80001/content/browser/service_worker/service_worker_registration.cc#newcode266 content/browser/service_worker/service_worker_registration.cc:266: bool ServiceWorkerRegistration::IsReadyToActivate() const { DCHECK(waiting_version()) ? https://codereview.chromium.org/2119143002/diff/80001/content/browser/service_worker/service_worker_registration.cc#newcode273 content/browser/service_worker/service_worker_registration.cc:273: (active->HasControllee() ...
4 years, 5 months ago (2016-07-08 05:04:42 UTC) #7
falken
PTAL https://codereview.chromium.org/2119143002/diff/80001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/2119143002/diff/80001/content/browser/service_worker/service_worker_registration.cc#newcode266 content/browser/service_worker/service_worker_registration.cc:266: bool ServiceWorkerRegistration::IsReadyToActivate() const { On 2016/07/08 05:04:42, nhiroki ...
4 years, 5 months ago (2016-07-08 07:06:46 UTC) #8
falken
kinuko: Do you have time to review this since most of the team is away? ...
4 years, 5 months ago (2016-07-12 05:38:28 UTC) #10
nhiroki
On 2016/07/12 05:38:28, falken wrote: > kinuko: Do you have time to review this since ...
4 years, 5 months ago (2016-07-13 01:12:22 UTC) #11
kinuko
looks like hiroki's reviewing this too so I hope he can catch details I'd miss ...
4 years, 5 months ago (2016-07-13 02:28:35 UTC) #12
nhiroki
https://codereview.chromium.org/2119143002/diff/100001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/2119143002/diff/100001/content/browser/service_worker/service_worker_registration.cc#newcode110 content/browser/service_worker/service_worker_registration.cc:110: if (active_version_ == version) (This comment is not related ...
4 years, 5 months ago (2016-07-13 04:29:30 UTC) #13
nhiroki
Layout tests look good. https://codereview.chromium.org/2119143002/diff/100001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html (right): https://codereview.chromium.org/2119143002/diff/100001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html#newcode18 third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html:18: navigator.serviceWorker.register('resources/empty-worker.js', { scope: dummy_scope }) ...
4 years, 5 months ago (2016-07-13 04:48:43 UTC) #14
falken
Updated PTAL. https://codereview.chromium.org/2119143002/diff/100001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/2119143002/diff/100001/content/browser/service_worker/service_worker_registration.cc#newcode110 content/browser/service_worker/service_worker_registration.cc:110: if (active_version_ == version) On 2016/07/13 04:29:30, ...
4 years, 5 months ago (2016-07-14 13:52:08 UTC) #17
nhiroki
lgtm https://codereview.chromium.org/2119143002/diff/180001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html (right): https://codereview.chromium.org/2119143002/diff/180001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html#newcode17 third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html:17: var dummy_scope = 'resources/there/is/no/there/there'; Maybe "var registration;" is ...
4 years, 5 months ago (2016-07-14 14:24:51 UTC) #20
falken
https://codereview.chromium.org/2119143002/diff/180001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html (right): https://codereview.chromium.org/2119143002/diff/180001/third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html#newcode17 third_party/WebKit/LayoutTests/http/tests/serviceworker/activation.html:17: var dummy_scope = 'resources/there/is/no/there/there'; On 2016/07/14 14:24:50, nhiroki (slow) ...
4 years, 5 months ago (2016-07-14 14:54:19 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2119143002/200001
4 years, 5 months ago (2016-07-14 14:54:38 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/262848)
4 years, 5 months ago (2016-07-14 16:26:40 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2119143002/200001
4 years, 5 months ago (2016-07-14 22:26:40 UTC) #28
commit-bot: I haz the power
Committed patchset #9 (id:200001)
4 years, 5 months ago (2016-07-14 23:40:08 UTC) #30
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 23:40:14 UTC) #31
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 23:42:05 UTC) #33
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/6c95b0ff8f694cda918e38c96387e5445713fc8e
Cr-Commit-Position: refs/heads/master@{#405628}

Powered by Google App Engine
This is Rietveld 408576698