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

Unified Diff: content/browser/blob_storage/chrome_blob_storage_context.cc

Issue 2829923004: Fail when uploading blob is non-existant (Closed)
Patch Set: fixed Created 3 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/blob_storage/chrome_blob_storage_context.cc
diff --git a/content/browser/blob_storage/chrome_blob_storage_context.cc b/content/browser/blob_storage/chrome_blob_storage_context.cc
index 92a2e8941c0fcca57d09b8133c65809a37972168..28734c2b4f99256f455f89376bd54f37bceabd71 100644
--- a/content/browser/blob_storage/chrome_blob_storage_context.cc
+++ b/content/browser/blob_storage/chrome_blob_storage_context.cc
@@ -197,7 +197,7 @@ storage::BlobStorageContext* GetBlobStorageContext(
return blob_storage_context->context();
}
-void AttachRequestBodyBlobDataHandles(ResourceRequestBodyImpl* body,
+bool AttachRequestBodyBlobDataHandles(ResourceRequestBodyImpl* body,
ResourceContext* resource_context) {
storage::BlobStorageContext* blob_context = GetBlobStorageContext(
GetChromeBlobStorageContextForResourceContext(resource_context));
@@ -209,14 +209,14 @@ void AttachRequestBodyBlobDataHandles(ResourceRequestBodyImpl* body,
continue;
std::unique_ptr<storage::BlobDataHandle> handle =
blob_context->GetBlobDataFromUUID(element.blob_uuid());
- DCHECK(handle);
if (!handle)
- continue;
+ return false;
// Ensure the blob and any attached shareable files survive until
// upload completion. The |body| takes ownership of |handle|.
const void* key = handle.get();
body->SetUserData(key, std::move(handle));
}
+ return true;
}
} // namespace content
« no previous file with comments | « content/browser/blob_storage/chrome_blob_storage_context.h ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698