Index: Source/bindings/templates/methods.cpp |
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp |
index eb039ef987f3f99339daed14701f54a8a84f714c..ea274670467e8e0c295e344da0bb560c432f7ddf 100644 |
--- a/Source/bindings/templates/methods.cpp |
+++ b/Source/bindings/templates/methods.cpp |
@@ -83,6 +83,10 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const |
} else { |
{{argument.set_default_value}}; |
} |
+ {% elif argument.is_undefined_to_null %} |
+ if (!isUndefinedOrNull(info[{{argument.index}}])) { |
+ {{generate_argument(method, argument, world_suffix) | indent(8)}} |
+ } |
{% else %} |
{{generate_argument(method, argument, world_suffix) | indent}} |
{% endif %} |
@@ -96,6 +100,9 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const |
{# FIXME: remove EventListener special case #} |
{% if argument.idl_type == 'EventListener' %} |
RefPtr<{{argument.idl_type}}> {{argument.name}} |
+{% elif argument.is_undefined_to_null %} |
+{{argument.cpp_type}}* {{argument.name}} = nullptr; |
+{{argument.cpp_type}} {{argument.name}}Value |
{%- else %} |
{{argument.cpp_type}} {{argument.name}} |
{%- endif %}{# argument.idl_type == 'EventListener' #} |