Chromium Code Reviews| Index: Source/bindings/scripts/v8_dictionary.py |
| diff --git a/Source/bindings/scripts/v8_dictionary.py b/Source/bindings/scripts/v8_dictionary.py |
| index 36129b552e2688af954c900efa4b5596a7391b66..0f4ba1669bf8b370a7b8b20bd8fbc5f4a39ec2a2 100644 |
| --- a/Source/bindings/scripts/v8_dictionary.py |
| +++ b/Source/bindings/scripts/v8_dictionary.py |
| @@ -99,6 +99,7 @@ def member_context(dictionary, member): |
| cpp_default_value, v8_default_value = default_values() |
| cpp_name = v8_utilities.cpp_name(member) |
| + is_deprecated_dictionary = unwrapped_idl_type.name == 'Dictionary' |
| return { |
| 'cpp_default_value': cpp_default_value, |
| @@ -113,7 +114,8 @@ def member_context(dictionary, member): |
| 'enum_values': unwrapped_idl_type.enum_values, |
| 'has_method_name': has_method_name_for_dictionary_member(member), |
| 'idl_type': idl_type.base_type, |
| - 'is_interface_type': idl_type.is_interface_type and not idl_type.is_dictionary, |
| + 'is_deprecated_dictionary': is_deprecated_dictionary, |
| + 'is_interface_type': idl_type.is_interface_type and not (idl_type.is_dictionary_type or is_deprecated_dictionary), |
| 'is_nullable': idl_type.is_nullable, |
| 'is_object': unwrapped_idl_type.name == 'Object', |
|
haraken
2015/08/26 00:40:54
Maybe it would be better to change this to:
'is
bashi
2015/08/26 00:48:14
Done.
|
| 'is_required': member.is_required, |
| @@ -177,6 +179,8 @@ def member_impl_context(member, interfaces_info, header_includes): |
| return '!m_%s.isNull()' % cpp_name |
| elif idl_type.name in ['Any', 'Object']: |
| return '!(m_{0}.isEmpty() || m_{0}.isNull() || m_{0}.isUndefined())'.format(cpp_name) |
| + elif idl_type.name == 'Dictionary': |
| + return '!m_%s.isUndefinedOrNull()' % cpp_name |
| else: |
| return 'm_%s' % cpp_name |