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

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

Issue 479563003: IDL: Set dictionary default values in impl constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 6dc772fdcf99944f5204b50dc7bcc8302e07093a..fd10f8c2a027973335a2f0aa1dfccd37c15eb382 100644
--- a/Source/bindings/scripts/v8_dictionary.py
+++ b/Source/bindings/scripts/v8_dictionary.py
@@ -121,8 +121,13 @@ def member_impl_context(member, interfaces_info, header_includes):
return v8_types.cpp_template_type('Nullable', member_cpp_type)
return member_cpp_type
+ cpp_default_value = None
+ if member.default_value and not member.default_value.is_null:
+ cpp_default_value = str(member.default_value)
+
header_includes.update(idl_type.impl_includes_for_type(interfaces_info))
return {
+ 'cpp_default_value': cpp_default_value,
'getter_expression': getter_expression(),
'has_method_expression': has_method_expression(),
'has_method_name': has_method_name_for_dictionary_member(member),
« no previous file with comments | « no previous file | Source/bindings/templates/dictionary_impl.h » ('j') | Source/bindings/templates/dictionary_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698