Skip to content

Commit

Permalink
Revert "BlobUrlLoader: Instrument for bug 882661."
Browse files Browse the repository at this point in the history
This reverts commit 4ff885a.

Reason for revert: CHECK not reached. The URLLoader to blame was the
WebRequestProxyingURLLoader.

Original change's description:
> BlobUrlLoader: Instrument for bug 882661.
> 
> In bug 882661: one mojo::URLLoader is sending OnStartLoadingResponseBody
> without sending OnReceiveResponse before.
> 
> Add instrumentation to check this never happen with this class.
> 
> Bug: 882661
> Change-Id: Ia9df5debbc03f0a5296c64edbcf6d975806bc021
> Reviewed-on: https://chromium-review.googlesource.com/c/1304435
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#605181}

TBR=kinuko@chromium.org,mek@chromium.org,arthursonzogni@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 882661
Change-Id: I16e8a5709f34d6909445c9cb0f674f07702ff594
Reviewed-on: https://chromium-review.googlesource.com/c/1329782
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Marijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606897}
  • Loading branch information
ArthurSonzogni authored and Commit Bot committed Nov 9, 2018
1 parent 134b52e commit ee333c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions storage/browser/blob/blob_url_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ void BlobURLLoader::DidReadSideData(net::IOBufferWithSize* data) {
void BlobURLLoader::DidRead(int num_bytes) {
if (response_body_consumer_handle_.is_valid()) {
// Send the data pipe on the first OnReadCompleted call.
CHECK(on_receive_response_sent_);
client_->OnStartLoadingResponseBody(
std::move(response_body_consumer_handle_));
}
Expand Down Expand Up @@ -166,7 +165,7 @@ void BlobURLLoader::HeadersCompleted(net::HttpStatusCode status_code,
// TODO(jam): some of this code can be shared with
// services/network/url_loader.h
client_->OnReceiveResponse(response);
on_receive_response_sent_ = true;
sent_headers_ = true;

if (metadata) {
const uint8_t* data = reinterpret_cast<const uint8_t*>(metadata->data());
Expand Down
4 changes: 1 addition & 3 deletions storage/browser/blob/blob_url_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@ class STORAGE_EXPORT BlobURLLoader : public storage::MojoBlobReader::Delegate,
net::HttpByteRange byte_range_;

uint64_t total_size_ = 0;
bool sent_headers_ = false;

std::unique_ptr<BlobDataHandle> blob_handle_;
mojo::ScopedDataPipeConsumerHandle response_body_consumer_handle_;

// TODO(https://crbug.com/882661): Remove this as soon as the bug is fixed.
bool on_receive_response_sent_ = false;

base::WeakPtrFactory<BlobURLLoader> weak_factory_;

DISALLOW_COPY_AND_ASSIGN(BlobURLLoader);
Expand Down

0 comments on commit ee333c3

Please sign in to comment.