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

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

Issue 567503002: Add toDouble() helper, and use toFloat()/toDouble() for conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/bindings/scripts/v8_types.py ('k') | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index 680d262aec62004f2f21ddd19c1ed3f9317146de..a9cf68312c121a81d15f0e880a34fa1362ebf022 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -281,14 +281,14 @@ static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
return;
{% endif %}
- {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
- {# v8_value_to_local_cpp_value('DOMString', 'name', 'propertyName') #}
- TOSTRING_VOID(V8StringResource<>, propertyName, name);
- {{setter.v8_value_to_local_cpp_value}};
{% if setter.has_exception_state %}
Jens Widell 2014/09/11 09:40:54 Moved this since otherwise the |exceptionState| lo
v8::String::Utf8Value namedProperty(name);
ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty, "{{interface_name}}", info.Holder(), info.GetIsolate());
{% endif %}
+ {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
+ {# v8_value_to_local_cpp_value('DOMString', 'name', 'propertyName') #}
+ TOSTRING_VOID(V8StringResource<>, propertyName, name);
+ {{setter.v8_value_to_local_cpp_value}};
{% set setter_name = setter.name or 'anonymousNamedSetter' %}
{% set setter_arguments =
['propertyName', 'propertyValue', 'exceptionState']
« no previous file with comments | « Source/bindings/scripts/v8_types.py ('k') | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698