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

Unified Diff: webkit/browser/fileapi/quota/quota_reservation_buffer.cc

Issue 131043002: [Pepper] Use platform path for QuotaReservation::GetOpenFileHandle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: suppress DCHECK failure Created 6 years, 11 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 | « content/browser/renderer_host/pepper/quota_reservation_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/quota/quota_reservation_buffer.cc
diff --git a/webkit/browser/fileapi/quota/quota_reservation_buffer.cc b/webkit/browser/fileapi/quota/quota_reservation_buffer.cc
index 80d3699665ceaa755169726f145c1781aaec65f8..14ea0d0cd8123022c072fa33faf7b84c26738e6f 100644
--- a/webkit/browser/fileapi/quota/quota_reservation_buffer.cc
+++ b/webkit/browser/fileapi/quota/quota_reservation_buffer.cc
@@ -46,8 +46,13 @@ void QuotaReservationBuffer::CommitFileGrowth(int64 quota_consumption,
return;
reservation_manager_->CommitQuotaUsage(origin_, type_, usage_delta);
- DCHECK_LE(quota_consumption, reserved_quota_);
if (quota_consumption > 0) {
+ if (quota_consumption > reserved_quota_) {
+ LOG(ERROR) << "Detected over consumption of the storage quota beyond its"
+ << " reservation";
+ quota_consumption = reserved_quota_;
+ }
+
reserved_quota_ -= quota_consumption;
reservation_manager_->ReleaseReservedQuota(
origin_, type_, quota_consumption);
« no previous file with comments | « content/browser/renderer_host/pepper/quota_reservation_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698