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

Unified Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.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/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index f326a0041130d2d4f0e9f4c40b8ecf5e1e3f8864..bba3de7b6572cf027c9975b6b0dde4c3d1e4dc5a 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -783,7 +783,7 @@ void XMLHttpRequest::send(FormData* body, ExceptionState& exceptionState)
httpBody = body->encodeMultiPartFormData();
if (getRequestHeader(HTTPNames::Content_Type).isEmpty()) {
- AtomicString contentType = AtomicString("multipart/form-data; boundary=", AtomicString::ConstructFromLiteral) + httpBody->boundary().data();
+ AtomicString contentType = AtomicString("multipart/form-data; boundary=") + httpBody->boundary().data();
setRequestHeaderInternal(HTTPNames::Content_Type, contentType);
}
}
@@ -1288,7 +1288,7 @@ AtomicString XMLHttpRequest::finalResponseMIMETypeWithFallback() const
// FIXME: This fallback is not specified in the final MIME type algorithm
// of the XHR spec. Move this to more appropriate place.
- return AtomicString("text/xml", AtomicString::ConstructFromLiteral);
+ return AtomicString("text/xml");
}
bool XMLHttpRequest::responseIsXML() const

Powered by Google App Engine
This is Rietveld 408576698