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

Issue 345583002: ServiceWorker: Add a function to abort all pending jobs in SWJobCoordinator (Closed)

Created:
6 years, 6 months ago by nhiroki
Modified:
6 years, 6 months ago
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
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Add a function to abort all pending jobs in SWJobCoordinator This will be used in the corruption recovery process. The process try to shutdown ServiceWorkerCoordinator and abort pending jobs retained by the coordinator to reject waiting promises. BUG=371675 TEST=content_unittest --gtest_filter=ServiceWorkerJobTest.AbortAll_* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278677

Patch Set 1 : #

Total comments: 10

Patch Set 2 : address comments and add test cases #

Total comments: 12

Patch Set 3 : fix for falken@'s comments #

Total comments: 2

Patch Set 4 : revert to PS2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -16 lines) Patch
M content/browser/service_worker/service_worker_job_coordinator.h View 1 2 3 chunks +9 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.cc View 1 4 chunks +26 lines, -10 lines 0 comments Download
M content/browser/service_worker/service_worker_job_unittest.cc View 1 2 1 chunk +115 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.h View 1 3 3 chunks +4 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 2 3 5 chunks +17 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job_base.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_unregister_job.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_unregister_job.cc View 1 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
nhiroki
Hi, can you take a look? Thanks.
6 years, 6 months ago (2014-06-18 17:14:23 UTC) #1
michaeln
https://codereview.chromium.org/345583002/diff/20001/content/browser/service_worker/service_worker_job_coordinator.h File content/browser/service_worker/service_worker_job_coordinator.h (right): https://codereview.chromium.org/345583002/diff/20001/content/browser/service_worker/service_worker_job_coordinator.h#newcode76 content/browser/service_worker/service_worker_job_coordinator.h:76: RegistrationJobMap jobs_; drive by: would it make sense to ...
6 years, 6 months ago (2014-06-19 01:12:33 UTC) #2
falken
Looks good, I agree with Michael's comment. https://codereview.chromium.org/345583002/diff/20001/content/browser/service_worker/service_worker_job_unittest.cc File content/browser/service_worker/service_worker_job_unittest.cc (right): https://codereview.chromium.org/345583002/diff/20001/content/browser/service_worker/service_worker_job_unittest.cc#newcode625 content/browser/service_worker/service_worker_job_unittest.cc:625: extra newline? ...
6 years, 6 months ago (2014-06-19 03:45:56 UTC) #3
nhiroki
https://codereview.chromium.org/345583002/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/345583002/diff/20001/content/browser/service_worker/service_worker_register_job.cc#newcode68 content/browser/service_worker/service_worker_register_job.cc:68: void ServiceWorkerRegisterJob::Abort() { On 2014/06/19 03:45:56, falken wrote: > ...
6 years, 6 months ago (2014-06-19 05:05:56 UTC) #4
nhiroki
Thank you for reviewing. Addressed comments and added test cases. Can you take another look? ...
6 years, 6 months ago (2014-06-19 05:53:09 UTC) #5
falken
https://codereview.chromium.org/345583002/diff/40001/content/browser/service_worker/service_worker_job_coordinator.h File content/browser/service_worker/service_worker_job_coordinator.h (right): https://codereview.chromium.org/345583002/diff/40001/content/browser/service_worker/service_worker_job_coordinator.h#newcode40 content/browser/service_worker/service_worker_job_coordinator.h:40: // Jobs are removed whenever they are finished or ...
6 years, 6 months ago (2014-06-19 08:10:57 UTC) #6
nhiroki
Updated. Can you take another look? Thanks! https://codereview.chromium.org/345583002/diff/40001/content/browser/service_worker/service_worker_job_coordinator.h File content/browser/service_worker/service_worker_job_coordinator.h (right): https://codereview.chromium.org/345583002/diff/40001/content/browser/service_worker/service_worker_job_coordinator.h#newcode40 content/browser/service_worker/service_worker_job_coordinator.h:40: // Jobs ...
6 years, 6 months ago (2014-06-19 10:04:05 UTC) #7
falken
LGTM, thanks! https://codereview.chromium.org/345583002/diff/80001/content/browser/service_worker/service_worker_unregister_job.cc File content/browser/service_worker/service_worker_unregister_job.cc (right): https://codereview.chromium.org/345583002/diff/80001/content/browser/service_worker/service_worker_unregister_job.cc#newcode38 content/browser/service_worker/service_worker_unregister_job.cc:38: CompleteInternal(SERVICE_WORKER_ERROR_ABORT); On 2014/06/19 10:04:05, nhiroki wrote: > ...
6 years, 6 months ago (2014-06-19 10:33:35 UTC) #8
nhiroki
On 2014/06/19 10:33:35, falken wrote: > LGTM, thanks! > > https://codereview.chromium.org/345583002/diff/80001/content/browser/service_worker/service_worker_unregister_job.cc > File content/browser/service_worker/service_worker_unregister_job.cc (right): ...
6 years, 6 months ago (2014-06-20 05:20:31 UTC) #9
nhiroki
The CQ bit was checked by nhiroki@chromium.org
6 years, 6 months ago (2014-06-20 05:20:43 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nhiroki@chromium.org/345583002/120001
6 years, 6 months ago (2014-06-20 05:25:02 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_dbg_simulator on tryserver.chromium ...
6 years, 6 months ago (2014-06-20 11:16:54 UTC) #12
commit-bot: I haz the power
6 years, 6 months ago (2014-06-20 11:37:20 UTC) #13
Message was sent while issue was closed.
Change committed as 278677

Powered by Google App Engine
This is Rietveld 408576698