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

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

Issue 1140013003: Adjust LocalStorage commit rate limiting. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/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 f554ac58814260442a14cdf3bd90b140ba786511..b4c9fc5243f2a7db299745e230b7b21301d8a4f1 100644
--- a/content/browser/dom_storage/dom_storage_namespace.cc
+++ b/content/browser/dom_storage/dom_storage_namespace.cc
@@ -59,7 +59,8 @@ void DOMStorageNamespace::CloseStorageArea(DOMStorageArea* area) {
AreaHolder* holder = GetAreaHolder(area->origin());
DCHECK(holder);
DCHECK_EQ(holder->area_.get(), area);
- --(holder->open_count_);
+ if (!--(holder->open_count_) && holder->area_->HasUncommittedChanges())
+ holder->area_->ScheduleImmediateCommit();
// TODO(michaeln): Clean up areas that aren't needed in memory anymore.
// The in-process-webkit based impl didn't do this either, but would be nice.
}
« chrome/browser/browser_process_impl.cc ('K') | « chrome/browser/browser_process_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698