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

Unified Diff: Source/bindings/templates/attributes.cpp

Issue 116983005: Use v8AtomicString instead of v8::String::NewFromUtf8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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: Source/bindings/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index cbbe4192db6d4b36179bb3eae036e2af68353cd8..0568b48239290ab52a05d4b8e5eccb3e511247bc 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -15,7 +15,7 @@ const v8::PropertyCallbackInfo<v8::Value>& info
{{cpp_class}}* imp = {{v8_class}}::toNative(holder);
{% endif %}
{% if attribute.cached_attribute_validation_method %}
- v8::Handle<v8::String> propertyName = v8::String::NewFromUtf8(info.GetIsolate(), "{{attribute.name}}", v8::String::kInternalizedString);
+ v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "{{attribute.name}}");
{{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder());
if (!imp->{{attribute.cached_attribute_validation_method}}()) {
v8::Handle<v8::Value> jsValue = info.Holder()->GetHiddenValue(propertyName);
@@ -166,7 +166,7 @@ v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info
exceptionState.throwIfNeeded();
{% endif %}
{% if attribute.cached_attribute_validation_method %}
- info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(), "{{attribute.name}}", v8::String::kInternalizedString)); // Invalidate the cached value.
+ info.Holder()->DeleteHiddenValue(v8AtomicString(info.GetIsolate(), "{{attribute.name}}")); // Invalidate the cached value.
{% endif %}
}
{% endfilter %}

Powered by Google App Engine
This is Rietveld 408576698