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

Unified Diff: content/browser/dom_storage/dom_storage_namespace.cc

Issue 2717843002: Purge session storage caches on memory pressure (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_namespace.cc
diff --git a/content/browser/dom_storage/dom_storage_namespace.cc b/content/browser/dom_storage/dom_storage_namespace.cc
index eb65d82406992d4a33260b9048f502c92e3d6f2b..847b1930d706983b435a02c88edb0f7a6a448dc9 100644
--- a/content/browser/dom_storage/dom_storage_namespace.cc
+++ b/content/browser/dom_storage/dom_storage_namespace.cc
@@ -118,8 +118,8 @@ void DOMStorageNamespace::DeleteSessionStorageOrigin(const GURL& origin) {
}
void DOMStorageNamespace::PurgeMemory(bool aggressively) {
- if (directory_.empty())
- return; // We can't purge w/o backing on disk.
+ if (namespace_id_ == kLocalStorageNamespaceId && directory_.empty())
+ return; // We can't purge local storage w/o backing on disk.
AreaMap::iterator it = areas_.begin();
while (it != areas_.end()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698