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

Unified Diff: storage/browser/blob/blob_data_builder.cc

Issue 942633004: IndexedDB: Fixed support for empty blobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted CREATE_NEW_FILE. Creating file before using FileStreamWriter. Created 5 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
Index: storage/browser/blob/blob_data_builder.cc
diff --git a/storage/browser/blob/blob_data_builder.cc b/storage/browser/blob/blob_data_builder.cc
index 51946c882f4e8dfec78e38fdfe4966c771695d7e..ad965b1180a020b598c77fe1c32653ea8d48b133 100644
--- a/storage/browser/blob/blob_data_builder.cc
+++ b/storage/browser/blob/blob_data_builder.cc
@@ -25,7 +25,9 @@ void BlobDataBuilder::AppendFile(const base::FilePath& file_path,
uint64_t offset,
uint64_t length,
const base::Time& expected_modification_time) {
- DCHECK(length > 0);
+ if (!length)
+ return;
michaeln 2015/03/03 00:02:51 ty!
+
scoped_ptr<DataElement> element(new DataElement());
element->SetToFilePathRange(file_path, offset, length,
expected_modification_time);

Powered by Google App Engine
This is Rietveld 408576698