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

Issue 369063004: ServiceWorker: SWRegisterJob should manage status of SWVersion (Closed)

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

Description

ServiceWorker: SWRegisterJob should manage status of SWVersion In the current implementation, ServiceWorkerVersion controls its status based on event notifications (eg. ServiceWorkerVersion::OnInstallEventFinished). But the spec algorithm requires to manage the status more flexibly during registration process. For example, the version should be set to INSTALLED status after associated to the documents because the page should be able to see '.waiting' on 'onstatechange' event. Because of this reason the register job should manage the status of the version. (Spec) https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html BUG=379012 TEST=content_unittest --gtest_filter=ServiceWorker* TEST=run_webkit_tests.py http/tests/serviceworker/waiting.html Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281675

Patch Set 1 : #

Total comments: 5

Patch Set 2 : fix tests #

Total comments: 12

Patch Set 3 : fix for comments #

Patch Set 4 : fix ServiceWorkerVersionBrowserTest #

Total comments: 13

Patch Set 5 : revive and update the test #

Total comments: 1

Patch Set 6 : rebase #

Messages

Total messages: 20 (0 generated)
nhiroki
Hi michaeln@ and falken@, Can you give me your early feedback on this? I'm working ...
6 years, 5 months ago (2014-07-03 16:27:17 UTC) #1
falken
I think this change makes sense especially as the [[Register]] steps directly include "Run the ...
6 years, 5 months ago (2014-07-04 02:19:54 UTC) #2
nhiroki
Thank you for your comments! On 2014/07/04 02:19:54, falken wrote: > I think this change ...
6 years, 5 months ago (2014-07-04 02:47:18 UTC) #3
nhiroki
On 2014/07/04 02:47:18, nhiroki wrote: > Thank you for your comments! > > On 2014/07/04 ...
6 years, 5 months ago (2014-07-04 02:59:18 UTC) #4
nhiroki
On 2014/07/04 02:59:18, nhiroki wrote: > On 2014/07/04 02:47:18, nhiroki wrote: > > Thank you ...
6 years, 5 months ago (2014-07-04 07:54:35 UTC) #5
nhiroki
Removed "WIP" mark. Can you take another look? Thanks! https://codereview.chromium.org/369063004/diff/20001/content/browser/service_worker/service_worker_register_job.cc File content/browser/service_worker/service_worker_register_job.cc (right): https://codereview.chromium.org/369063004/diff/20001/content/browser/service_worker/service_worker_register_job.cc#newcode268 content/browser/service_worker/service_worker_register_job.cc:268: ...
6 years, 5 months ago (2014-07-04 07:56:51 UTC) #6
falken
lgtm with nits It would be nice to revise the CL description to include the ...
6 years, 5 months ago (2014-07-04 09:30:50 UTC) #7
nhiroki
https://codereview.chromium.org/369063004/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/369063004/diff/40001/content/browser/service_worker/service_worker_register_job.cc#newcode314 content/browser/service_worker/service_worker_register_job.cc:314: // "9. If registration.waitingWorker is not null, then:..." On ...
6 years, 5 months ago (2014-07-04 10:37:26 UTC) #8
nhiroki
Hmm... ServiceWorkerVersionBrowserTests are failing... I'm now investigating them.
6 years, 5 months ago (2014-07-07 04:26:16 UTC) #9
nhiroki
On 2014/07/07 04:26:16, nhiroki wrote: > Hmm... ServiceWorkerVersionBrowserTests are failing... I'm now investigating > them. ...
6 years, 5 months ago (2014-07-07 06:29:25 UTC) #10
falken
https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_context_request_handler.cc File content/browser/service_worker/service_worker_context_request_handler.cc (right): https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_context_request_handler.cc#newcode79 content/browser/service_worker/service_worker_context_request_handler.cc:79: version_->status() != ServiceWorkerVersion::INSTALLING) { I'm curious whether this can ...
6 years, 5 months ago (2014-07-07 07:05:16 UTC) #11
nhiroki
https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_context_request_handler.cc File content/browser/service_worker/service_worker_context_request_handler.cc (right): https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_context_request_handler.cc#newcode79 content/browser/service_worker/service_worker_context_request_handler.cc:79: version_->status() != ServiceWorkerVersion::INSTALLING) { On 2014/07/07 07:05:16, falken wrote: ...
6 years, 5 months ago (2014-07-07 08:26:41 UTC) #12
falken
LGTM
6 years, 5 months ago (2014-07-07 08:36:44 UTC) #13
michaeln
https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_register_job.cc File content/browser/service_worker/service_worker_register_job.cc (right): https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_register_job.cc#newcode292 content/browser/service_worker/service_worker_register_job.cc:292: registration()->SetInstallingVersion(NULL); the call to SetInstallingVersion is not needed here ...
6 years, 5 months ago (2014-07-07 21:56:37 UTC) #14
nhiroki
Thank you for reviewing. Updated. https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_register_job.cc File content/browser/service_worker/service_worker_register_job.cc (right): https://codereview.chromium.org/369063004/diff/80001/content/browser/service_worker/service_worker_register_job.cc#newcode292 content/browser/service_worker/service_worker_register_job.cc:292: registration()->SetInstallingVersion(NULL); On 2014/07/07 21:56:37, ...
6 years, 5 months ago (2014-07-07 23:07:41 UTC) #15
michaeln
thnx, lgtm https://codereview.chromium.org/369063004/diff/120001/content/browser/service_worker/service_worker_version_unittest.cc File content/browser/service_worker/service_worker_version_unittest.cc (right): https://codereview.chromium.org/369063004/diff/120001/content/browser/service_worker/service_worker_version_unittest.cc#newcode77 content/browser/service_worker/service_worker_version_unittest.cc:77: version->RegisterStatusChangeCallback( The test ensures that a callback ...
6 years, 5 months ago (2014-07-07 23:45:16 UTC) #16
nhiroki
The CQ bit was checked by nhiroki@chromium.org
6 years, 5 months ago (2014-07-08 00:42:15 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/369063004/140001
6 years, 5 months ago (2014-07-08 00:44:25 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 ...
6 years, 5 months ago (2014-07-08 04:48:54 UTC) #19
commit-bot: I haz the power
6 years, 5 months ago (2014-07-08 06:10:16 UTC) #20
Message was sent while issue was closed.
Change committed as 281675

Powered by Google App Engine
This is Rietveld 408576698