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

Unified Diff: third_party/WebKit/Source/modules/fetch/Response.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/Response.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index 2088dab37975bee2fdf207a6c0ce942828624156..2c832936c79e9e2c523861609c362c2d2e108599 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -135,7 +135,7 @@ Response* Response::create(ScriptState* scriptState, ScriptValue bodyValue, cons
RefPtr<EncodedFormData> formData = V8FormData::toImpl(body.As<v8::Object>())->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();
bodyHandle = FetchFormDataConsumerHandle::create(executionContext, formData.release());
} else if (RuntimeEnabledFeatures::responseConstructedWithReadableStreamEnabled() && ReadableStreamOperations::isReadableStream(scriptState, bodyValue)) {
bodyHandle = ReadableStreamDataConsumerHandle::create(scriptState, bodyValue);

Powered by Google App Engine
This is Rietveld 408576698