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

Unified Diff: Source/modules/fetch/Body.cpp

Issue 1028913002: ReadableStream.cancel's parameter should be optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
Index: Source/modules/fetch/Body.cpp
diff --git a/Source/modules/fetch/Body.cpp b/Source/modules/fetch/Body.cpp
index 3196a3c7d027faae92d3c38ebb3e24f4c83980d5..045b6a224edccda5784910e92e520ca7cc1d9912 100644
--- a/Source/modules/fetch/Body.cpp
+++ b/Source/modules/fetch/Body.cpp
@@ -141,7 +141,9 @@ private:
void pullSource() override { }
ScriptPromise cancelSource(ScriptState* scriptState, ScriptValue reason) override
{
- return ScriptPromise();
+ close();
+ m_bodyStreamBuffer->unregisterObserver();
+ return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isolate()));
tyoshino (SeeGerritForStatus) 2015/03/23 03:57:21 which call terminates the fetch?
yhirano 2015/03/23 05:47:32 You're right, and I found implementing the cancell
}
// BodyStreamBuffer::Observer functions.
« Source/core/streams/ReadableStream.cpp ('K') | « Source/core/streams/ReadableStreamReader.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698