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

Issue 413063004: Service Worker: in Unregister, wait until after the active worker no longer controls a document (Closed)

Created:
6 years, 5 months ago by falken
Modified:
6 years, 4 months ago
Reviewers:
michaeln, nhiroki
CC:
chromium-reviews, michaeln, 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: in Unregister, wait until after the active worker no longer controls a document As per spec: https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#unregister-algorithm Unregister shouldn't doom the active worker or delete the registration until the active worker no longer controls a document. This means that if register() is called before that happens, the unregistration is effectively canceled. BUG=388095 TEST=https://codereview.chromium.org/416003003/ Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288994

Patch Set 1 #

Total comments: 3

Patch Set 2 : delete/restore from storage #

Total comments: 3

Patch Set 3 : rebase and merge #

Total comments: 2

Patch Set 4 : better merge #

Total comments: 2

Patch Set 5 : sync #

Patch Set 6 : cleanups #

Patch Set 7 : more cleanup #

Total comments: 20

Patch Set 8 : sync #

Patch Set 9 : address comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -73 lines) Patch
M content/browser/service_worker/service_worker_database.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 3 4 5 6 7 8 2 chunks +27 lines, -26 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.h View 1 2 3 4 5 6 7 8 4 chunks +22 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 1 2 3 4 5 6 7 8 7 chunks +79 lines, -19 lines 1 comment Download
M content/browser/service_worker/service_worker_storage.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 1 2 3 4 5 6 7 8 7 chunks +35 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_unregister_job.h View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_unregister_job.cc View 1 4 chunks +22 lines, -18 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
falken
This is still a bit WIP but what do you think? One issue is that ...
6 years, 5 months ago (2014-07-24 09:46:44 UTC) #1
michaeln
looks promising > One issue is that if the browser shuts down before the document ...
6 years, 5 months ago (2014-07-25 00:02:04 UTC) #2
nhiroki
LGTM after renaming functions as michael mentioned.
6 years, 5 months ago (2014-07-25 03:34:52 UTC) #3
falken
Thanks for the comments! On 2014/07/25 00:02:04, michaeln wrote: > looks promising > > > ...
6 years, 5 months ago (2014-07-25 12:47:26 UTC) #4
falken
Uploaded new patch that deletes and restores from storage. The spec also changed a bit ...
6 years, 4 months ago (2014-07-28 12:18:01 UTC) #5
michaeln
i see you've got a layout test over in the blink repo for one case ...
6 years, 4 months ago (2014-07-29 03:33:39 UTC) #6
falken
https://codereview.chromium.org/413063004/diff/20002/content/browser/service_worker/service_worker_register_job.cc File content/browser/service_worker/service_worker_register_job.cc (right): https://codereview.chromium.org/413063004/diff/20002/content/browser/service_worker/service_worker_register_job.cc#newcode224 content/browser/service_worker/service_worker_register_job.cc:224: existing_registration->AbortPendingClear(); On 2014/07/29 03:33:39, michaeln wrote: > what if ...
6 years, 4 months ago (2014-07-29 05:36:22 UTC) #7
falken
This is back to WIP, I rebased on Michael's recent patch which required some merging. ...
6 years, 4 months ago (2014-07-29 14:04:05 UTC) #8
falken
Think I got this working now. PTAL. (did you have comments before? I noticed the ...
6 years, 4 months ago (2014-07-30 09:45:30 UTC) #9
michaeln
looks like the resurrecting behavior is going to change, i'd like to see how that ...
6 years, 4 months ago (2014-07-31 00:08:07 UTC) #10
falken
On 2014/07/31 00:08:07, michaeln wrote: > looks like the resurrecting behavior is going to change, ...
6 years, 4 months ago (2014-07-31 03:27:10 UTC) #11
falken
This is ready for another look! PTAL.
6 years, 4 months ago (2014-08-08 07:37:59 UTC) #12
falken
On 2014/08/08 07:37:59, falken wrote: > This is ready for another look! PTAL. ping!
6 years, 4 months ago (2014-08-11 11:27:26 UTC) #13
nhiroki
LGTM with nits https://codereview.chromium.org/413063004/diff/150001/content/browser/service_worker/service_worker_register_job.cc File content/browser/service_worker/service_worker_register_job.cc (right): https://codereview.chromium.org/413063004/diff/150001/content/browser/service_worker/service_worker_register_job.cc#newcode189 content/browser/service_worker/service_worker_register_job.cc:189: // "1. Set registration.[[Uninstalling]] to false." ...
6 years, 4 months ago (2014-08-11 12:24:51 UTC) #14
michaeln
lgtm, i have a few comments https://codereview.chromium.org/413063004/diff/150001/content/browser/service_worker/service_worker_registration.cc File content/browser/service_worker/service_worker_registration.cc (right): https://codereview.chromium.org/413063004/diff/150001/content/browser/service_worker/service_worker_registration.cc#newcode205 content/browser/service_worker/service_worker_registration.cc:205: context_->storage()->NotifyUninstallingRegistration(this); I think ...
6 years, 4 months ago (2014-08-12 02:15:36 UTC) #15
falken
Addressed feedback. I think I'll CQ this, but since the patch changed a bit in ...
6 years, 4 months ago (2014-08-12 09:06:07 UTC) #16
falken
The CQ bit was checked by falken@chromium.org
6 years, 4 months ago (2014-08-12 09:24:30 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/413063004/210001
6 years, 4 months ago (2014-08-12 09:27:05 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-12 13:42:25 UTC) #19
commit-bot: I haz the power
6 years, 4 months ago (2014-08-12 15:54:48 UTC) #20
Message was sent while issue was closed.
Change committed as 288994

Powered by Google App Engine
This is Rietveld 408576698