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

Unified Diff: third_party/WebKit/Source/wtf/text/StringImpl.cpp

Issue 1363653006: Reserve capacity for static strings HashMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the deduced string length (exclude NULL terminator) Created 5 years, 3 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/wtf/text/StringImpl.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.cpp b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
index 2f82c06ba0495ae6d5b9d483c7ef9239a52281fe..38d5c599eedd0ad513e00b0828033599cc16d963 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
@@ -397,6 +397,12 @@ StringImpl* StringImpl::createStatic(const char* string, unsigned length, unsign
return impl;
}
+void StringImpl::reserveStaticStringsCapacityForSize(unsigned size)
+{
+ ASSERT(s_allowCreationOfStaticStrings);
+ staticStrings().reserveCapacityForSize(size);
+}
+
PassRefPtr<StringImpl> StringImpl::create(const UChar* characters, unsigned length)
{
if (!characters || !length)
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | third_party/WebKit/Source/wtf/text/StringStatics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698