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

Unified Diff: Source/bindings/templates/dictionary_impl.cpp

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/templates/dictionary_impl.cpp
diff --git a/Source/bindings/templates/dictionary_impl.cpp b/Source/bindings/templates/dictionary_impl.cpp
index 64fff01caf213821b850c615721a2350e08ee0ec..87152a4ba142fb21baf2539196dfb1099702b551 100644
--- a/Source/bindings/templates/dictionary_impl.cpp
+++ b/Source/bindings/templates/dictionary_impl.cpp
@@ -16,6 +16,9 @@ namespace blink {
{# Constructor #}
{{cpp_class}}::{{cpp_class}}()
{
+ {% for member in members if member.cpp_default_value %}
+ {{member.setter_name}}({{member.cpp_default_value}});
+ {% endfor %}
}
void {{cpp_class}}::trace(Visitor* visitor)

Powered by Google App Engine
This is Rietveld 408576698