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

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

Issue 713683003: IDL: Support optional union type arguments with default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add unit tests Created 6 years, 1 month 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/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 0e90cdd97145ca06b67e54a062c44979859ec617..9f95858d9ce0fae33e9a2c9473736e7e1271a92a 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -64,11 +64,11 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
{% endfor %}
{
{% for argument in method.arguments %}
- {% if argument.default_value %}
+ {% if argument.set_default_value %}
if (!info[{{argument.index}}]->IsUndefined()) {
{{generate_argument(method, argument, world_suffix) | indent(8)}}
} else {
- {{argument.name}} = {{argument.default_value}};
+ {{argument.set_default_value}};
}
{% else %}
{{generate_argument(method, argument, world_suffix) | indent}}

Powered by Google App Engine
This is Rietveld 408576698