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

Unified Diff: Source/bindings/scripts/v8_methods.py

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/scripts/v8_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index 870cd4d4c79a51e64810647dadc6d8d0bd864ab8..06cecae8987980c4ffdd72625b09f2a3e425edf6 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -225,6 +225,10 @@ def argument_context(interface, method, argument, index, is_visible=True):
this_cpp_type = idl_type.cpp_type_args(extended_attributes=extended_attributes,
raw_type=True,
used_as_variadic_argument=argument.is_variadic)
+ is_undefined_to_null = idl_type.is_primitive_type and \
haraken 2015/06/17 16:01:42 \ is not needed.
+ has_extended_attribute_value(argument, "Default", "Undefined") and \
haraken 2015/06/17 16:01:42 Do we need this condition? I mean, what should hap
+ has_extended_attribute_value(argument, "TreatUndefinedAs", "Null")
+
return {
'cpp_type': (
v8_types.cpp_template_type('Nullable', this_cpp_type)
@@ -250,6 +254,7 @@ def argument_context(interface, method, argument, index, is_visible=True):
'is_explicit_nullable': idl_type.is_explicit_nullable,
'is_nullable': idl_type.is_nullable,
'is_optional': argument.is_optional,
+ 'is_undefined_to_null': is_undefined_to_null,
'is_variadic': argument.is_variadic,
'is_variadic_wrapper_type': is_variadic_wrapper_type,
'is_wrapper_type': idl_type.is_wrapper_type,

Powered by Google App Engine
This is Rietveld 408576698