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

Unified Diff: content/browser/browser_context.cc

Issue 2159133002: Shutdown StoragePartition before ProfileIOData is being shut down (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 5 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: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 729df89e82c5aea8770db483dfdfbb6bdf806e55..59b0047b06762270ccd31eb0b1abae02ed25d0d7 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -486,10 +486,18 @@ BrowserContext::~BrowserContext() {
<< "Attempting to destroy a BrowserContext that never called "
<< "Initialize()";
+ DCHECK(!GetUserData(kStoragePartitionMapKeyName))
+ << "StoragePartitionMap is not shut down properly";
+
RemoveBrowserContextFromUserIdMap(this);
if (GetUserData(kDownloadManagerKeyName))
GetDownloadManager(this)->Shutdown();
}
+void BrowserContext::ShutdownStoragePartitions() {
+ if (GetUserData(kStoragePartitionMapKeyName))
+ RemoveUserData(kStoragePartitionMapKeyName);
+}
+
} // namespace content
« no previous file with comments | « chromecast/browser/cast_browser_context.cc ('k') | content/browser/service_worker/service_worker_context_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698