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

Unified Diff: third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl

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/build/scripts/templates/MakeNames.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl
index c9098ca9fe489eb232575ff8ae690bfe9b296443..ed0c03160f41f7ef42c01dc3f783c5c1a13ca419 100644
--- a/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/MakeNames.cpp.tmpl
@@ -17,9 +17,7 @@ namespace {{namespace}}Names {
using namespace WTF;
-const int k{{suffix}}NameCount = {{entries|length}};
-
-void* {{suffix}}NamesStorage[k{{suffix}}NameCount * ((sizeof(AtomicString) + sizeof(void *) - 1) / sizeof(void *))];
+void* {{suffix}}NamesStorage[{{namespace}}{{suffix}}NamesCount * ((sizeof(AtomicString) + sizeof(void *) - 1) / sizeof(void *))];
{% for entry in entries|sort(attribute='name', case_sensitive=True) %}
{% filter enable_conditional(entry.Conditional) %}

Powered by Google App Engine
This is Rietveld 408576698