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

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

Issue 259773008: Add support for type checking of floating point arguments as [TypeChecking=Unrestricted] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove outdated test Created 6 years, 8 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/IDLExtendedAttributes.txt ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index 4cb00489c1f47da8882505ab320504f675e3ce1c..dd32e7c7251a2e34b83f721c7d8fec6947755aa8 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -142,6 +142,7 @@ def generate_argument(interface, method, argument, index):
idl_type = argument.idl_type
this_cpp_value = cpp_value(interface, method, index)
is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type
+
return {
'cpp_type': idl_type.cpp_type_args(used_in_cpp_sequence=is_variadic_wrapper_type),
'cpp_value': this_cpp_value,
@@ -156,6 +157,10 @@ def generate_argument(interface, method, argument, index):
(has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or
has_extended_attribute_value(method, 'TypeChecking', 'Interface')) and
idl_type.is_wrapper_type,
+ 'has_type_checking_unrestricted':
+ (has_extended_attribute_value(interface, 'TypeChecking', 'Unrestricted') or
+ has_extended_attribute_value(method, 'TypeChecking', 'Unrestricted')) and
+ idl_type.name in ('Float', 'Double'),
# Dictionary is special-cased, but arrays and sequences shouldn't be
'idl_type': not idl_type.array_or_sequence_type and idl_type.base_type,
'idl_type_object': idl_type,
« no previous file with comments | « Source/bindings/IDLExtendedAttributes.txt ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698