Commit 23dee687 authored by yhirano's avatar yhirano Committed by Commit bot

Fix BlobBytesConsumer state assumption on cancellation

BUG=666756
R=tyoshino@chromium.org

Review-Url: https://codereview.chromium.org/2572683002
Cr-Commit-Position: refs/heads/master@{#438118}
parent 3305f49d
...@@ -231,13 +231,7 @@ void BlobBytesConsumer::didFinishLoading(unsigned long identifier, ...@@ -231,13 +231,7 @@ void BlobBytesConsumer::didFinishLoading(unsigned long identifier,
void BlobBytesConsumer::didFail(const ResourceError& e) { void BlobBytesConsumer::didFail(const ResourceError& e) {
if (e.isCancellation()) { if (e.isCancellation()) {
// |m_loader| can be canceled when if (m_state != PublicState::ReadableOrWaiting)
// - this object explicitly cancels it, or
// - the global context is shutting down.
// In the first case, |m_state| should be Closed.
if (getExecutionContext() && !getExecutionContext()->isContextDestroyed())
DCHECK_EQ(PublicState::Closed, m_state);
if (m_state == PublicState::Closed)
return; return;
} }
DCHECK_EQ(PublicState::ReadableOrWaiting, m_state); DCHECK_EQ(PublicState::ReadableOrWaiting, m_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment