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

Unified Diff: third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp

Issue 2572683002: Fix BlobBytesConsumer state assumption on cancellation (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp
index ee586c0253242c7113c9b2fe9329df08afa18f6c..250b8270773cc130dcd9083094c29671643feae5 100644
--- a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp
@@ -231,13 +231,7 @@ void BlobBytesConsumer::didFinishLoading(unsigned long identifier,
void BlobBytesConsumer::didFail(const ResourceError& e) {
if (e.isCancellation()) {
- // |m_loader| can be canceled when
- // - 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)
+ if (m_state != PublicState::ReadableOrWaiting)
return;
}
DCHECK_EQ(PublicState::ReadableOrWaiting, m_state);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698