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

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

Issue 429853002: IDL: Add build target for IDL dictionary impl generation in core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index 8f559f59492ed2af6fa2dc833113c0e12d7207b3..7182e70c6a4d1a6499400eb52c80409cfbe188f5 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -207,17 +207,18 @@ def argument_context(interface, method, argument, index):
not idl_type.is_basic_type):
raise Exception('Private scripts supports only primitive types and DOM wrappers.')
+ default_cpp_value = argument.default_cpp_value
return {
'cpp_type': idl_type.cpp_type_args(extended_attributes=extended_attributes,
raw_type=True,
used_as_variadic_argument=argument.is_variadic),
'cpp_value': this_cpp_value,
# FIXME: check that the default value's type is compatible with the argument's
- 'default_value': argument.default_cpp_value,
+ 'default_value': default_cpp_value,
'enum_validation_expression': idl_type.enum_validation_expression,
'handle': '%sHandle' % argument.name,
# FIXME: remove once [Default] removed and just use argument.default_value
- 'has_default': 'Default' in extended_attributes or argument.default_value,
+ 'has_default': 'Default' in extended_attributes or default_cpp_value,
'has_type_checking_interface':
(has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or
has_extended_attribute_value(method, 'TypeChecking', 'Interface')) and
@@ -393,6 +394,8 @@ def union_arguments(idl_type):
def argument_default_cpp_value(argument):
+ if argument.idl_type.is_dictionary:
+ return '%s::create()' % argument.idl_type.base_type
if not argument.default_value:
return None
return argument.idl_type.literal_cpp_value(argument.default_value)

Powered by Google App Engine
This is Rietveld 408576698