Index: Source/bindings/scripts/v8_dictionary.py |
diff --git a/Source/bindings/scripts/v8_dictionary.py b/Source/bindings/scripts/v8_dictionary.py |
index 5598cdb9bf100741595277fe9be5640f0ccca33a..f6a05787ce9cf6fbd778b0bf197530a2bd0eebc0 100644 |
--- a/Source/bindings/scripts/v8_dictionary.py |
+++ b/Source/bindings/scripts/v8_dictionary.py |
@@ -11,6 +11,7 @@ from idl_types import IdlType |
from v8_globals import includes |
import v8_types |
import v8_utilities |
+from v8_utilities import has_extended_attribute_value |
DICTIONARY_H_INCLUDES = frozenset([ |
@@ -56,7 +57,7 @@ def dictionary_context(dictionary, interfaces_info): |
context = { |
'cpp_class': cpp_class, |
'header_includes': set(DICTIONARY_H_INCLUDES), |
- 'members': [member_context(member) |
+ 'members': [member_context(dictionary, member) |
for member in sorted(dictionary.members, |
key=operator.attrgetter('name'))], |
'use_permissive_dictionary_conversion': 'PermissiveDictionaryConversion' in dictionary.extended_attributes, |
@@ -74,11 +75,15 @@ def dictionary_context(dictionary, interfaces_info): |
return context |
-def member_context(member): |
+def member_context(dictionary, member): |
idl_type = member.idl_type |
idl_type.add_includes_for_type() |
unwrapped_idl_type = unwrap_nullable_if_needed(idl_type) |
+ restricted_float = ( |
+ has_extended_attribute_value(dictionary, 'TypeChecking', 'Unrestricted') or |
+ has_extended_attribute_value(member, 'TypeChecking', 'Unrestricted')) |
+ |
def default_values(): |
if not member.default_value: |
return None, None |
@@ -115,7 +120,7 @@ def member_context(member): |
'v8_default_value': v8_default_value, |
'v8_value_to_local_cpp_value': unwrapped_idl_type.v8_value_to_local_cpp_value( |
member.extended_attributes, member.name + 'Value', |
- member.name, isolate='isolate'), |
+ member.name, isolate='isolate', restricted_float=restricted_float), |
} |