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

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: 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 dfaef64356afd78cdbeef85436b84286d5243fac..756c0ec2be85c92eb09cc67167e1f53ed1700ec1 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)
« third_party/WebKit/Source/core/Init.cpp ('K') | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698