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

Unified Diff: third_party/WebKit/Source/core/streams/ReadableStream.cpp

Issue 1418813004: [Fetch API] Reflect spec changes of bodyUsed property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: third_party/WebKit/Source/core/streams/ReadableStream.cpp
diff --git a/third_party/WebKit/Source/core/streams/ReadableStream.cpp b/third_party/WebKit/Source/core/streams/ReadableStream.cpp
index 77752d3d75a16cb3bdd869bc7343a496920214d8..dd25edbc38f843da0d576acaa44d3318b861a2c1 100644
--- a/third_party/WebKit/Source/core/streams/ReadableStream.cpp
+++ b/third_party/WebKit/Source/core/streams/ReadableStream.cpp
@@ -111,6 +111,7 @@ ScriptPromise ReadableStream::cancel(ScriptState* scriptState, ScriptValue reaso
ScriptPromise ReadableStream::cancelInternal(ScriptState* scriptState, ScriptValue reason)
{
+ setIsDisturbed();
closeInternal();
return m_source->cancelSource(scriptState, reason).then(ConstUndefined::create(scriptState));
}
@@ -125,7 +126,7 @@ void ReadableStream::error(DOMException* exception)
rejectAllPendingReads(m_exception);
m_state = Errored;
if (m_reader)
- m_reader->releaseLock();
+ m_reader->error();
}
void ReadableStream::didSourceStart()
@@ -179,7 +180,7 @@ void ReadableStream::closeInternal()
resolveAllPendingReadsAsDone();
clearQueue();
if (m_reader)
- m_reader->releaseLock();
+ m_reader->close();
}
DEFINE_TRACE(ReadableStream)

Powered by Google App Engine
This is Rietveld 408576698