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

Issue 798833002: ServiceWorker: Make skipWaiting only works on documents using current registration (Closed)

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

Description

ServiceWorker: Make skipWaiting only works on documents using current registration A document will associate a new matched registration if it is not controlled, but it doesn't equal to "using" the registration. We should omit documents that are not using the registration when skipWaiting happens. BUG=370742 TEST=http/tests/serviceworker/skip-waiting.html Committed: https://crrev.com/837728521e7cfa757b9e5871423606b2529d08b1 Cr-Commit-Position: refs/heads/master@{#308327}

Patch Set 1 #

Total comments: 6

Patch Set 2 : edit comments #

Total comments: 1

Patch Set 3 : typo fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M content/browser/service_worker/service_worker_provider_host.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 14 (2 generated)
xiang
PTAL, thanks!
6 years ago (2014-12-12 04:33:29 UTC) #2
falken
lgtm with nits Please also indicate in the change description how this is tested. https://codereview.chromium.org/798833002/diff/1/content/browser/service_worker/service_worker_provider_host.cc ...
6 years ago (2014-12-15 02:29:25 UTC) #3
xiang
Thanks for the review, CL updated. https://codereview.chromium.org/798833002/diff/1/content/browser/service_worker/service_worker_provider_host.cc File content/browser/service_worker/service_worker_provider_host.cc (right): https://codereview.chromium.org/798833002/diff/1/content/browser/service_worker/service_worker_provider_host.cc#newcode87 content/browser/service_worker/service_worker_provider_host.cc:87: if (!controlling_version_) On ...
6 years ago (2014-12-15 06:00:53 UTC) #4
falken
Thanks for adding the comments. I still have some feedback. Also, please don't land until ...
6 years ago (2014-12-15 06:18:01 UTC) #5
falken
https://codereview.chromium.org/798833002/diff/1/content/browser/service_worker/service_worker_provider_host.cc File content/browser/service_worker/service_worker_provider_host.cc (right): https://codereview.chromium.org/798833002/diff/1/content/browser/service_worker/service_worker_provider_host.cc#newcode87 content/browser/service_worker/service_worker_provider_host.cc:87: if (!controlling_version_) On 2014/12/15 06:18:01, falken wrote: > On ...
6 years ago (2014-12-15 06:20:20 UTC) #6
xiang
> > https://codereview.chromium.org/798833002/diff/20001/content/browser/service_worker/service_worker_provider_host.cc > File content/browser/service_worker/service_worker_provider_host.cc (right): > > https://codereview.chromium.org/798833002/diff/20001/content/browser/service_worker/service_worker_provider_host.cc#newcode89 > content/browser/service_worker/service_worker_provider_host.cc:89: // the > ...
6 years ago (2014-12-15 06:30:04 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/798833002/40001
6 years ago (2014-12-15 08:21:45 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years ago (2014-12-15 09:10:57 UTC) #10
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/837728521e7cfa757b9e5871423606b2529d08b1 Cr-Commit-Position: refs/heads/master@{#308327}
6 years ago (2014-12-15 09:11:47 UTC) #11
michaeln
This seems like a step backwards? Now, even with skip waiting, a page reload (or ...
6 years ago (2014-12-15 23:49:41 UTC) #12
xiang
On 2014/12/15 23:49:41, michaeln wrote: > This seems like a step backwards? > > Now, ...
6 years ago (2014-12-16 01:11:59 UTC) #13
falken
6 years ago (2014-12-16 01:27:14 UTC) #14
Message was sent while issue was closed.
On 2014/12/16 01:11:59, xiang wrote:
> On 2014/12/15 23:49:41, michaeln wrote:
> > This seems like a step backwards?
> > 
> > Now, even with skip waiting, a page reload (or new nav) is always required
in
> > order to get a newly registered (for the first time) service worker into
use.
> > 
> > That seems contrary to the intent of skipWaiting. What do the spec miesters
> > think about this behavior?
> 
> This CL intends to address https://codereview.chromium.org/765323002/#msg17
> comment.
> I think it's a decision from spec guys, maybe falken@ knows more rational
about
> it.

Yep, this is in agreement with the spec. replace() has been split into a "skip
waiting" part and "take control" part, The take control part is to be spec'd:
https://github.com/slightlyoff/ServiceWorker/issues/586

Powered by Google App Engine
This is Rietveld 408576698