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

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

Issue 2679563002: [WIP] Expose Request.body property
Patch Set: Created 3 years, 10 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: third_party/WebKit/Source/modules/fetch/Request.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Request.cpp b/third_party/WebKit/Source/modules/fetch/Request.cpp
index c5619f07b39381fcf473d51bae4cc115c18954a9..30cff0eee38d0dd992be4f264fef5b9856a0c715 100644
--- a/third_party/WebKit/Source/modules/fetch/Request.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Request.cpp
@@ -382,7 +382,7 @@ Request* Request::createRequestWithRequestOrString(
// contains no header named `Content-Type`, append
// `Content-Type`/|Content-Type| to |r|'s Headers object. Rethrow any
// exception."
- temporaryBody = new BodyStreamBuffer(scriptState, std::move(init.body));
+ temporaryBody = init.body;
if (!init.contentType.isEmpty() &&
!r->getHeaders()->has(HTTPNames::Content_Type, exceptionState)) {
r->getHeaders()->append(HTTPNames::Content_Type, init.contentType,
@@ -441,8 +441,7 @@ Request* Request::create(ScriptState* scriptState,
const String& input,
const Dictionary& init,
ExceptionState& exceptionState) {
- RequestInit requestInit(scriptState->getExecutionContext(), init,
- exceptionState);
+ RequestInit requestInit(scriptState, init, exceptionState);
return createRequestWithRequestOrString(scriptState, nullptr, input,
requestInit, exceptionState);
}
@@ -457,8 +456,7 @@ Request* Request::create(ScriptState* scriptState,
Request* input,
const Dictionary& init,
ExceptionState& exceptionState) {
- RequestInit requestInit(scriptState->getExecutionContext(), init,
- exceptionState);
+ RequestInit requestInit(scriptState, init, exceptionState);
return createRequestWithRequestOrString(scriptState, input, String(),
requestInit, exceptionState);
}
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.cpp ('k') | third_party/WebKit/Source/modules/fetch/Request.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698