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

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

Issue 1186823014: [bindings] Eliminate custom bindings for DeviceOrientationEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Introducing |TreatUndefinedAs=Null| Created 5 years, 6 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: Source/bindings/templates/conversions.cpp
diff --git a/Source/bindings/templates/conversions.cpp b/Source/bindings/templates/conversions.cpp
index fdf9d7815aed9abea7f9c0e074b5894594c9be78..16fa2711d314b12ca1ab18f267e6ba2f3e3b27e3 100644
--- a/Source/bindings/templates/conversions.cpp
+++ b/Source/bindings/templates/conversions.cpp
@@ -17,8 +17,13 @@
{% endif %}
{% else %}{# item.declare_variable #}
{% if item.assign_expression %}
+{% if thing.is_undefined_to_null %}
+{{item.cpp_name}}Value = {{item.assign_expression}};
+{{item.cpp_name}} = &{{item.cpp_name}}Value;
+{% else %}
{{item.cpp_name}} = {{item.assign_expression}};
{% endif %}
+{% endif %}
{% endif %}{# item.declare_variable #}
{% if item.set_expression %}
{{item.set_expression}};

Powered by Google App Engine
This is Rietveld 408576698