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

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

Issue 1418813004: [Fetch API] Reflect spec changes of bodyUsed property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/modules/fetch/Response.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index a7d2421779c49e3e92b48b318430457c06533cd1..40fb2ddc801d0576cc8051ae55779ac95dd62cb4 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -390,6 +390,11 @@ bool Response::hasBody() const
return m_response->internalBuffer();
}
+bool Response::bodyUsed()
+{
+ return (internalBodyBuffer() && internalBodyBuffer()->stream()->isDisturbed()) || (bodyBuffer() && bodyBuffer()->stream()->isDisturbed());
tyoshino (SeeGerritForStatus) 2015/11/18 09:55:36 just need to check internalBodyBuffer?
yhirano 2015/11/19 08:41:29 Done.
+}
+
String Response::mimeType() const
{
return m_response->mimeType();

Powered by Google App Engine
This is Rietveld 408576698