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

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

Issue 1130763006: IDL: Add any support to IDL dictionary and use it in CustomEventInit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/core/v8/custom/V8CustomEventCustom.cpp ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0e47fc8a206b8d88c6652b8c6ef0f69dc084fa15 100644
--- a/Source/bindings/scripts/v8_dictionary.py
+++ b/Source/bindings/scripts/v8_dictionary.py
@@ -165,7 +165,6 @@ 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_object = idl_type.name == 'Object'
cpp_name = v8_utilities.cpp_name(member)
def getter_expression():
@@ -176,7 +175,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 idl_type.name in ['Any', 'Object']:
return '!(m_{0}.isEmpty() || m_{0}.isNull() || m_{0}.isUndefined())'.format(cpp_name)
else:
return 'm_%s' % cpp_name
@@ -198,7 +197,6 @@ 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_object': is_object,
'is_traceable': idl_type.is_traceable,
'member_cpp_type': member_cpp_type(),
'null_setter_name': null_setter_name_for_dictionary_member(member),
« no previous file with comments | « Source/bindings/core/v8/custom/V8CustomEventCustom.cpp ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698