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

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

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: 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 09587e2456a33feacef28226daa51cf5198305c3..6687601f039292a9163d9fe953570c01121ab38f 100644
--- a/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
+++ b/third_party/WebKit/Source/modules/fetch/RequestInit.cpp
@@ -79,11 +79,11 @@ RequestInit::RequestInit(ExecutionContext* context, const Dictionary& options, E
RefPtr<EncodedFormData> formData = V8FormData::toImpl(v8::Local<v8::Object>::Cast(v8Body))->encodeMultiPartFormData();
// Here we handle formData->boundary() as a C-style string. See
// FormDataEncoder::generateUniqueBoundaryString.
- contentType = AtomicString("multipart/form-data; boundary=", AtomicString::ConstructFromLiteral) + formData->boundary().data();
+ contentType = AtomicString("multipart/form-data; boundary=") + formData->boundary().data();
body = FetchFormDataConsumerHandle::create(context, formData.release());
} else if (V8URLSearchParams::hasInstance(v8Body, isolate)) {
RefPtr<EncodedFormData> formData = V8URLSearchParams::toImpl(v8::Local<v8::Object>::Cast(v8Body))->encodeFormData();
- contentType = AtomicString("application/x-www-form-urlencoded;charset=UTF-8", AtomicString::ConstructFromLiteral);
+ contentType = AtomicString("application/x-www-form-urlencoded;charset=UTF-8");
body = FetchFormDataConsumerHandle::create(context, formData.release());
} else if (V8PasswordCredential::hasInstance(v8Body, isolate)) {
// See https://w3c.github.io/webappsec-credential-management/#monkey-patching-fetch-4

Powered by Google App Engine
This is Rietveld 408576698