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

Unified Diff: third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl

Issue 2658173003: [Bindings] Internalize generated dictionary keys using v8AtomicString. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
index 78cc47bd12e7eae372b681a7a6112bff380572f4..6146238c740ee40050d1a8a9b76532efc58ab139 100644
--- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
@@ -46,7 +46,7 @@ void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
{% for member in members %}
{% filter runtime_enabled(member.runtime_enabled_feature_name) %}
v8::Local<v8::Value> {{member.name}}Value;
- if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "{{member.name}}")).ToLocal(&{{member.name}}Value)) {
+ if (!v8Object->Get(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}")).ToLocal(&{{member.name}}Value)) {
exceptionState.rethrowV8Exception(block.Exception());
return;
}
@@ -107,15 +107,15 @@ bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona
{% if member.is_object %}
DCHECK(impl.{{member.getter_name}}().isObject());
{% endif %}
- if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "{{member.name}}"), {{member.cpp_value_to_v8_value}})))
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}"), {{member.cpp_value_to_v8_value}})))
return false;
{% if member.v8_default_value %}
} else {
- if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "{{member.name}}"), {{member.v8_default_value}})))
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}"), {{member.v8_default_value}})))
return false;
{% elif member.is_nullable %}
} else {
- if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8String(isolate, "{{member.name}}"), v8::Null(isolate))))
+ if (!v8CallBoolean(dictionary->CreateDataProperty(isolate->GetCurrentContext(), v8AtomicString(isolate, "{{member.name}}"), v8::Null(isolate))))
return false;
{% elif member.is_required %}
} else {
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698