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

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

Issue 2909613002: Replaced usage of RefPtr::Release with std::move wraps. (Closed)
Patch Set: Created 3 years, 7 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/RequestInit.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/RequestInit.cpp b/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
index adb7077c13a58496e190836fcf858cab66fe1272..2110c3e4b11ce09d6346512d1daa4debb1de6b5c 100644
--- a/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
+++ b/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
@@ -150,7 +150,7 @@ RequestInit::RequestInit(ExecutionContext* context,
RefPtr<BlobDataHandle> blob_data_handle =
V8Blob::toImpl(v8_body.As<v8::Object>())->GetBlobDataHandle();
content_type = blob_data_handle->GetType();
- body = new BlobBytesConsumer(context, blob_data_handle.Release());
+ body = new BlobBytesConsumer(context, std::move(blob_data_handle));
} else if (V8FormData::hasInstance(v8_body, isolate)) {
RefPtr<EncodedFormData> form_data =
V8FormData::toImpl(v8_body.As<v8::Object>())->EncodeMultiPartFormData();
@@ -158,14 +158,14 @@ RequestInit::RequestInit(ExecutionContext* context,
// FormDataEncoder::generateUniqueBoundaryString.
content_type = AtomicString("multipart/form-data; boundary=") +
form_data->Boundary().data();
- body = new FormDataBytesConsumer(context, form_data.Release());
+ body = new FormDataBytesConsumer(context, std::move(form_data));
} else if (V8URLSearchParams::hasInstance(v8_body, isolate)) {
RefPtr<EncodedFormData> form_data =
V8URLSearchParams::toImpl(v8_body.As<v8::Object>())
->ToEncodedFormData();
content_type =
AtomicString("application/x-www-form-urlencoded;charset=UTF-8");
- body = new FormDataBytesConsumer(context, form_data.Release());
+ body = new FormDataBytesConsumer(context, std::move(form_data));
} else if (v8_body->IsString()) {
content_type = "text/plain;charset=UTF-8";
body = new FormDataBytesConsumer(

Powered by Google App Engine
This is Rietveld 408576698