Index: Source/bindings/scripts/v8_dictionary.py |
diff --git a/Source/bindings/scripts/v8_dictionary.py b/Source/bindings/scripts/v8_dictionary.py |
index 3010c9fa5e958d29572f238e8f6eff856c410f92..cd9b48463bce1003ba7147f286b7c2c367ab67bc 100644 |
--- a/Source/bindings/scripts/v8_dictionary.py |
+++ b/Source/bindings/scripts/v8_dictionary.py |
@@ -165,6 +165,7 @@ def dictionary_impl_context(dictionary, interfaces_info): |
def member_impl_context(member, interfaces_info, header_includes): |
idl_type = unwrap_nullable_if_needed(member.idl_type) |
+ is_any = idl_type.name == 'Any' |
is_object = idl_type.name == 'Object' |
haraken
2015/05/18 01:59:44
Do we need to distinguish is_any from is_object?
bashi
2015/05/20 00:22:01
No. Actually, we don't need to put |is_any| and |i
|
cpp_name = v8_utilities.cpp_name(member) |
@@ -176,7 +177,7 @@ def member_impl_context(member, interfaces_info, header_includes): |
def has_method_expression(): |
if idl_type.impl_should_use_nullable_container or idl_type.is_enum or idl_type.is_string_type or idl_type.is_union_type: |
return '!m_%s.isNull()' % cpp_name |
- elif is_object: |
+ elif is_object or is_any: |
return '!(m_{0}.isEmpty() || m_{0}.isNull() || m_{0}.isUndefined())'.format(cpp_name) |
else: |
return 'm_%s' % cpp_name |
@@ -198,6 +199,7 @@ def member_impl_context(member, interfaces_info, header_includes): |
'getter_expression': getter_expression(), |
'has_method_expression': has_method_expression(), |
'has_method_name': has_method_name_for_dictionary_member(member), |
+ 'is_any': is_any, |
'is_object': is_object, |
'is_traceable': idl_type.is_traceable, |
'member_cpp_type': member_cpp_type(), |