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

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: 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..3199fcec70a574937407573eba2e871dcdd2c50a 100644
--- a/storage/browser/blob/blob_data_builder.cc
+++ b/storage/browser/blob/blob_data_builder.cc
@@ -15,7 +15,6 @@ BlobDataBuilder::~BlobDataBuilder() {
}
void BlobDataBuilder::AppendData(const char* data, size_t length) {
- DCHECK(length > 0);
scoped_ptr<DataElement> element(new DataElement());
element->SetToBytes(data, length);
items_.push_back(new BlobDataItem(element.Pass()));
@@ -25,7 +24,6 @@ void BlobDataBuilder::AppendFile(const base::FilePath& file_path,
uint64_t offset,
uint64_t length,
const base::Time& expected_modification_time) {
- DCHECK(length > 0);
scoped_ptr<DataElement> element(new DataElement());
element->SetToFilePathRange(file_path, offset, length,
expected_modification_time);
@@ -36,7 +34,6 @@ void BlobDataBuilder::AppendFile(const base::FilePath& file_path,
void BlobDataBuilder::AppendBlob(const std::string& uuid,
uint64_t offset,
uint64_t length) {
- DCHECK_GT(length, 0ul);
scoped_ptr<DataElement> element(new DataElement());
element->SetToBlobRange(uuid, offset, length);
items_.push_back(new BlobDataItem(element.Pass()));
@@ -53,7 +50,6 @@ void BlobDataBuilder::AppendFileSystemFile(
uint64_t offset,
uint64_t length,
const base::Time& expected_modification_time) {
- DCHECK(length > 0);
scoped_ptr<DataElement> element(new DataElement());
element->SetToFileSystemUrlRange(url, offset, length,
expected_modification_time);

Powered by Google App Engine
This is Rietveld 408576698