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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 653633004: Shutdown Service Workers before the profile is destroyed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index b0ae1eab596e7721a3f6b5167830969c81f61c54..fa510f91e32ba9dbadd127db041d75c34eaae24c 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -349,10 +349,6 @@ unsigned int BrowserProcessImpl::AddRefModule() {
return module_ref_count_;
}
-static void ShutdownServiceWorkerContext(content::StoragePartition* partition) {
- partition->GetServiceWorkerContext()->Terminate();
michaeln 2014/10/21 23:24:13 I was wondering where the Terminate() method came
-}
-
unsigned int BrowserProcessImpl::ReleaseModule() {
DCHECK(CalledOnValidThread());
DCHECK_NE(0u, module_ref_count_);
@@ -360,14 +356,6 @@ unsigned int BrowserProcessImpl::ReleaseModule() {
if (0 == module_ref_count_) {
release_last_reference_callstack_ = base::debug::StackTrace();
- // Stop service workers
- ProfileManager* pm = profile_manager();
- std::vector<Profile*> profiles(pm->GetLoadedProfiles());
- for (size_t i = 0; i < profiles.size(); ++i) {
- content::BrowserContext::ForEachStoragePartition(
- profiles[i], base::Bind(ShutdownServiceWorkerContext));
- }
-
#if defined(ENABLE_PRINTING)
// Wait for the pending print jobs to finish. Don't do this later, since
// this might cause a nested message loop to run, and we don't want pending

Powered by Google App Engine
This is Rietveld 408576698