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

Issue 377153003: Service Worker: set active worker to REDUNDANT when unregistered (Closed)

Created:
6 years, 5 months ago by falken
Modified:
6 years, 5 months ago
Reviewers:
michaeln, jsbell, nhiroki
CC:
chromium-reviews, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, alecflett+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Service Worker: set active worker to REDUNDANT when unregistered As per spec update: https://github.com/slightlyoff/ServiceWorker/issues/353 Now the active worker is set to REDUNDANT when unregistered. If it has a controllee, this happens when it no longer has a controllee. This patch adds a Doom function to ServiceWorkerVersion which takes care of setting REDUNDANT and purging resources once there's no controllee. This obviates the need for ServiceWorkerStorage to listen for NoControllees and purge resources then. BUG=388095 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282636

Patch Set 1 #

Patch Set 2 : make setting redundant clearly the responsibility of SWStorage #

Total comments: 5

Patch Set 3 : version purges the resources #

Total comments: 10

Patch Set 4 : sync #

Patch Set 5 : review comments #

Messages

Total messages: 18 (0 generated)
falken
WDYT of this change? It moves some of Unregister steps logic to Storage. I think ...
6 years, 5 months ago (2014-07-09 08:47:13 UTC) #1
michaeln
> WDYT of this change? I wonder if the version class can take care of ...
6 years, 5 months ago (2014-07-10 00:55:23 UTC) #2
falken
Thanks for the detailed feedback! I like this direction and gave it a try, you ...
6 years, 5 months ago (2014-07-10 14:05:12 UTC) #3
michaeln
This new CL looks a lot better to me! This one lgtm. On 2014/07/10 14:05:12, ...
6 years, 5 months ago (2014-07-11 01:15:42 UTC) #4
michaeln
oops forgot the inline comments https://codereview.chromium.org/377153003/diff/40001/content/browser/service_worker/service_worker_register_job.cc File content/browser/service_worker/service_worker_register_job.cc (right): https://codereview.chromium.org/377153003/diff/40001/content/browser/service_worker/service_worker_register_job.cc#newcode395 content/browser/service_worker/service_worker_register_job.cc:395: registration()->UnsetVersion(new_version()); I think the ...
6 years, 5 months ago (2014-07-11 01:16:05 UTC) #5
michaeln
the cl description needs to be fixed up
6 years, 5 months ago (2014-07-11 01:16:53 UTC) #6
nhiroki
lgtm https://codereview.chromium.org/377153003/diff/40001/content/browser/service_worker/service_worker_unregister_job.cc File content/browser/service_worker/service_worker_unregister_job.cc (right): https://codereview.chromium.org/377153003/diff/40001/content/browser/service_worker/service_worker_unregister_job.cc#newcode71 content/browser/service_worker/service_worker_unregister_job.cc:71: // TODO: Also doom installing version. 'installing version' ...
6 years, 5 months ago (2014-07-11 03:57:57 UTC) #7
nhiroki
https://codereview.chromium.org/377153003/diff/40001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/377153003/diff/40001/content/browser/service_worker/service_worker_version.h#newcode87 content/browser/service_worker/service_worker_version.h:87: virtual void OnNoControllees(ServiceWorkerVersion* version) {}; According to grep, this ...
6 years, 5 months ago (2014-07-11 07:59:13 UTC) #8
falken
Thanks for the comments! Response to non-inline comment first... On 2014/07/11 01:15:42, michaeln wrote: > ...
6 years, 5 months ago (2014-07-11 10:53:32 UTC) #9
falken
Thanks, I'll CQ this. Note that this will change some layout tests: https://codereview.chromium.org/381383005/ https://codereview.chromium.org/377153003/diff/40001/content/browser/service_worker/service_worker_register_job.cc File ...
6 years, 5 months ago (2014-07-11 12:08:12 UTC) #10
falken
The CQ bit was checked by falken@chromium.org
6 years, 5 months ago (2014-07-11 12:10:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/377153003/80001
6 years, 5 months ago (2014-07-11 12:10:41 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-11 14:02:21 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-11 15:18:22 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/170070)
6 years, 5 months ago (2014-07-11 15:18:23 UTC) #15
falken
The CQ bit was checked by falken@chromium.org
6 years, 5 months ago (2014-07-11 15:29:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/377153003/80001
6 years, 5 months ago (2014-07-11 15:29:36 UTC) #17
commit-bot: I haz the power
6 years, 5 months ago (2014-07-11 16:42:05 UTC) #18
Message was sent while issue was closed.
Change committed as 282636

Powered by Google App Engine
This is Rietveld 408576698