Index: third_party/WebKit/Source/core/dom/URLSearchParams.cpp |
diff --git a/third_party/WebKit/Source/core/dom/URLSearchParams.cpp b/third_party/WebKit/Source/core/dom/URLSearchParams.cpp |
index b8108c7de3b4fdc38079c0321d9826347888c7b4..5ecad6ccd5faab3ce8a2366b91dfd69f5997baba 100644 |
--- a/third_party/WebKit/Source/core/dom/URLSearchParams.cpp |
+++ b/third_party/WebKit/Source/core/dom/URLSearchParams.cpp |
@@ -179,12 +179,10 @@ void URLSearchParams::set(const String& name, const String& value) |
PassRefPtr<EncodedFormData> URLSearchParams::encodeFormData() const |
{ |
- RefPtr<EncodedFormData> data = EncodedFormData::create(); |
Vector<char> encodedData; |
for (const auto& param : m_params) |
FormDataEncoder::addKeyValuePairAsFormData(encodedData, param.first.utf8(), param.second.utf8(), EncodedFormData::FormURLEncoded); |
- data->appendData(encodedData.data(), encodedData.size()); |
- return data.release(); |
+ return EncodedFormData::create(encodedData.data(), encodedData.size()); |
} |
DEFINE_TRACE(URLSearchParams) |