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

Unified Diff: Source/bindings/templates/union.h

Issue 937773002: IDL: Support default values for dictionary members of union types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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/union.h
diff --git a/Source/bindings/templates/union.h b/Source/bindings/templates/union.h
index ac47522a903a2312ebb906efb2ef55a1356f0810..24d0bb7373bf82186c797fd43e0c24633469346c 100644
--- a/Source/bindings/templates/union.h
+++ b/Source/bindings/templates/union.h
@@ -28,6 +28,7 @@ public:
bool is{{member.type_name}}() const { return m_type == {{member.specific_type_enum}}; }
{{member.rvalue_cpp_type}} getAs{{member.type_name}}() const;
void set{{member.type_name}}({{member.rvalue_cpp_type}});
+ static {{container.cpp_class}} from{{member.type_name}}({{member.rvalue_cpp_type}});
{% endfor %}
{% if container.needs_trace %}

Powered by Google App Engine
This is Rietveld 408576698