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

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: more fix 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);
mmenke 2016/07/19 17:55:20 Storage partitions are stored as user data attache
kinuko 2016/07/21 03:06:25 I suppose we wanted to avoid exposing internal stu
mmenke 2016/07/21 15:27:20 I didn't mean to suggest you make that part of thi
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698