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

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: 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
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..6ea01cd2dfbd3f2ca8efbc31c915b3bdf867a21a 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),
@@ -106,7 +108,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_string_type):
+ idl_type.is_enum or idl_type.is_string_type):
return '!m_%s.isNull()' % member.name
else:
return 'm_%s' % member.name

Powered by Google App Engine
This is Rietveld 408576698