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

Unified Diff: third_party/WebKit/Source/build/scripts/make_css_property_names.py

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/build/scripts/make_css_property_names.py
diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_names.py b/third_party/WebKit/Source/build/scripts/make_css_property_names.py
index 0d5235bb81cdfb756871d476b485e4ec6365e1b7..e4b72bc6bea6c3ad612a73d05d7dace4fe8952a1 100755
--- a/third_party/WebKit/Source/build/scripts/make_css_property_names.py
+++ b/third_party/WebKit/Source/build/scripts/make_css_property_names.py
@@ -139,10 +139,8 @@ const AtomicString& getPropertyNameAtomicString(CSSPropertyID id)
int index = id - firstCSSProperty;
static AtomicString* propertyStrings = new AtomicString[lastUnresolvedCSSProperty]; // Intentionally never destroyed.
AtomicString& propertyString = propertyStrings[index];
- if (propertyString.isNull()) {
- const char* propertyName = propertyNameStringsPool + propertyNameStringsOffsets[index];
- propertyString = AtomicString(propertyName, strlen(propertyName), AtomicString::ConstructFromLiteral);
- }
+ if (propertyString.isNull())
+ propertyString = AtomicString(propertyNameStringsPool + propertyNameStringsOffsets[index]);
return propertyString;
}

Powered by Google App Engine
This is Rietveld 408576698