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

Issue 305723003: Shut down the ServiceWorker system as the browser's shutting down. (Closed)

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

Description

Shut down the ServiceWorker system as the browser's shutting down. This avoids a DCHECK in ProfileDestroyer::DestroyProfileWhenAppropriate. I also added a Chrome-side browsertest for the Service Worker system, where we can check other things that only show up with this embedder. I tried to move the DCHECK into ~BrowserContext so that we wouldn't need to expose the Terminate() function across the Content API, but: * BrowserContext doesn't know whether it's a "testing" profile. * There is no BrowserContext::GetOffTheRecordProfile with which to check that transitive processes have been shut down. * (Minor) GetHostsForProfile() works by iterating over all hosts, and moving the DCHECK to ~BrowserContext would have doubled the number of iterations needed. BUG=368570 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273741

Patch Set 1 #

Patch Set 2 : Fix Windows by adding a FILE_PATH_LITERAL. #

Total comments: 2

Patch Set 3 : Remove a redundant clear() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -1 line) Patch
M chrome/browser/browser_process_impl.cc View 3 chunks +14 lines, -0 lines 0 comments Download
A chrome/browser/chrome_service_worker_browsertest.cc View 1 1 chunk +73 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_job_coordinator.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_process_manager.cc View 2 chunks +13 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_register_job.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/public/browser/service_worker_context.h View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Jeffrey Yasskin
This takes option 2 from https://code.google.com/p/chromium/issues/detail?id=368570#c7 for the reasons mentioned in the CL description. Is ...
6 years, 6 months ago (2014-05-28 17:43:34 UTC) #1
Jeffrey Yasskin
On 2014/05/28 17:43:34, Jeffrey Yasskin wrote: > This takes option 2 from > https://code.google.com/p/chromium/issues/detail?id=368570#c7 for ...
6 years, 6 months ago (2014-05-28 17:51:33 UTC) #2
jam
lgtm On 2014/05/28 17:43:34, Jeffrey Yasskin wrote: > This takes option 2 from > https://code.google.com/p/chromium/issues/detail?id=368570#c7 ...
6 years, 6 months ago (2014-05-28 18:57:56 UTC) #3
falken
lgtm horo@ may want to take a look too https://codereview.chromium.org/305723003/diff/10001/content/browser/service_worker/service_worker_job_coordinator.cc File content/browser/service_worker/service_worker_job_coordinator.cc (right): https://codereview.chromium.org/305723003/diff/10001/content/browser/service_worker/service_worker_job_coordinator.cc#newcode46 content/browser/service_worker/service_worker_job_coordinator.cc:46: ...
6 years, 6 months ago (2014-05-29 02:50:27 UTC) #4
horo
lgtm
6 years, 6 months ago (2014-05-29 04:06:17 UTC) #5
Jeffrey Yasskin
https://codereview.chromium.org/305723003/diff/10001/content/browser/service_worker/service_worker_job_coordinator.cc File content/browser/service_worker/service_worker_job_coordinator.cc (right): https://codereview.chromium.org/305723003/diff/10001/content/browser/service_worker/service_worker_job_coordinator.cc#newcode46 content/browser/service_worker/service_worker_job_coordinator.cc:46: jobs_.clear(); On 2014/05/29 02:50:27, falken wrote: > Looks like ...
6 years, 6 months ago (2014-05-29 21:00:23 UTC) #6
Jeffrey Yasskin
The CQ bit was checked by jyasskin@chromium.org
6 years, 6 months ago (2014-05-29 21:53:54 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/305723003/30001
6 years, 6 months ago (2014-05-29 21:55:34 UTC) #8
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, 6 months ago (2014-05-30 00:20:27 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-05-30 00:44:47 UTC) #10
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/158102)
6 years, 6 months ago (2014-05-30 00:44:48 UTC) #11
horo
The CQ bit was checked by horo@chromium.org
6 years, 6 months ago (2014-05-30 01:12:56 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/305723003/30001
6 years, 6 months ago (2014-05-30 01:14:24 UTC) #13
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 07:01:56 UTC) #14
Message was sent while issue was closed.
Change committed as 273741

Powered by Google App Engine
This is Rietveld 408576698