Index: Source/bindings/templates/methods.cpp |
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
index 4a44e7228dc0ce23b2376546459023e7542a645f..a90f7813893ba099bb4fa2c65f659d81acccb658 100644 |
--- a/Source/bindings/templates/methods.cpp |
+++ b/Source/bindings/templates/methods.cpp |
@@ -84,7 +84,15 @@ if (listener && !impl->toNode()) |
V8RethrowTryCatchScope rethrow(block); |
{% endif %} |
{% for argument in method.arguments %} |
+ {% if argument.default_value %} |
+ if (info.Length() > {{argument.index}}) { |
+ {{generate_argument(method, argument, world_suffix) | indent(8)}} |
+ } else { |
+ {{argument.name}} = {{argument.default_value}}; |
+ } |
+ {% else %} |
{{generate_argument(method, argument, world_suffix) | indent}} |
+ {% endif %} |
{% endfor %} |
} |
{% endmacro %} |