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

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

Issue 561633003: IDL: Enumerations support in dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove parens Created 6 years, 3 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 | « LayoutTests/fast/dom/idl-dictionary-unittest-expected.txt ('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 69fd1c082bb946f79594e24767d3281f697c7ee3..cbe902b89658739b3d4a08a5c64fc86c1444442c 100644
--- a/Source/bindings/scripts/v8_dictionary.py
+++ b/Source/bindings/scripts/v8_dictionary.py
@@ -18,6 +18,7 @@ DICTIONARY_H_INCLUDES = frozenset([
])
DICTIONARY_CPP_INCLUDES = frozenset([
+ 'bindings/core/v8/ExceptionState.h',
# FIXME: Remove this, http://crbug.com/321462
'bindings/core/v8/Dictionary.h',
])
@@ -75,6 +76,7 @@ def member_context(member):
cpp_value='impl->%s()' % member.name, isolate='isolate',
creation_context='creationContext',
extended_attributes=member.extended_attributes),
+ 'enum_validation_expression': idl_type.enum_validation_expression,
'has_method_name': has_method_name_for_dictionary_member(member),
'name': member.name,
'setter_name': setter_name_for_dictionary_member(member),
@@ -105,8 +107,7 @@ def member_impl_context(member, interfaces_info, header_includes):
return 'm_%s' % member.name
def has_method_expression():
- if (idl_type.impl_should_use_nullable_container or
- idl_type.is_string_type):
+ if idl_type.impl_should_use_nullable_container or idl_type.is_enum or idl_type.is_string_type:
return '!m_%s.isNull()' % member.name
else:
return 'm_%s' % member.name
« no previous file with comments | « LayoutTests/fast/dom/idl-dictionary-unittest-expected.txt ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698