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

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

Issue 1985383002: Logging and check fail crbug/612358 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleaned up logging Created 4 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
« no previous file with comments | « storage/browser/blob/blob_async_builder_host.h ('k') | storage/browser/blob/blob_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_async_builder_host.cc
diff --git a/storage/browser/blob/blob_async_builder_host.cc b/storage/browser/blob/blob_async_builder_host.cc
index c30b3833e902dff55d669f66baff37664b156c47..8390be46760f9102acc0272a46efdf570c44d8c2 100644
--- a/storage/browser/blob/blob_async_builder_host.cc
+++ b/storage/browser/blob/blob_async_builder_host.cc
@@ -291,6 +291,7 @@ BlobTransportResult BlobAsyncBuilderHost::OnMemoryResponses(
void BlobAsyncBuilderHost::CancelBuildingBlob(const std::string& uuid,
IPCBlobCreationCancelCode code,
BlobStorageContext* context) {
+ LOG(ERROR) << "Cancelling blob " << uuid;
DCHECK(context);
auto state_it = async_blob_map_.find(uuid);
if (state_it == async_blob_map_.end()) {
@@ -305,6 +306,8 @@ void BlobAsyncBuilderHost::CancelBuildingBlob(const std::string& uuid,
async_blob_map_.erase(state_it);
}
+
+
void BlobAsyncBuilderHost::CancelAll(BlobStorageContext* context) {
DCHECK(context);
// If the blob still exists in the context (and is being built), then we know
@@ -313,6 +316,8 @@ void BlobAsyncBuilderHost::CancelAll(BlobStorageContext* context) {
std::vector<std::unique_ptr<BlobDataHandle>> referenced_pending_blobs;
for (const auto& uuid_state_pair : async_blob_map_) {
if (context->IsBeingBuilt(uuid_state_pair.first)) {
+ auto* state = uuid_state_pair.second.get();
+ state->LogState();
referenced_pending_blobs.emplace_back(
context->GetBlobDataFromUUID(uuid_state_pair.first));
}
@@ -323,6 +328,8 @@ void BlobAsyncBuilderHost::CancelAll(BlobStorageContext* context) {
async_blob_map_.clear();
for (const std::unique_ptr<BlobDataHandle>& handle :
referenced_pending_blobs) {
+ LOG(ERROR) << "cancelling blob " << handle->uuid()
+ << " which is being expected by someone";
context->CancelPendingBlob(
handle->uuid(), IPCBlobCreationCancelCode::SOURCE_DIED_IN_TRANSIT);
}
@@ -390,6 +397,7 @@ BlobTransportResult BlobAsyncBuilderHost::ContinueBlobMemoryRequests(
// Since we are only using one handle at a time, transform our handle
// index correctly back to 0.
byte_requests->back().handle_index = 0;
+ LOG(ERROR) << uuid << " sending shared memory request";
break;
case IPCBlobItemRequestStrategy::FILE:
case IPCBlobItemRequestStrategy::UNKNOWN:
« no previous file with comments | « storage/browser/blob/blob_async_builder_host.h ('k') | storage/browser/blob/blob_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698