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

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

Issue 373043004: IDL: Treat undefined as missing for optional arguments with defaults (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 5 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/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 4ce408a59b5aa344e0e771e271ffad433a7c281d..5035d8c4bae131db882ed9466077522ade80f2b6 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -70,7 +70,7 @@ static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const
{% endif %}
{% for argument in method.arguments %}
{% if argument.default_value %}
- if (info.Length() > {{argument.index}}) {
+ if (!info[{{argument.index}}]->IsUndefined()) {
{{generate_argument(method, argument, world_suffix) | indent(8)}}
} else {
{{argument.name}} = {{argument.default_value}};

Powered by Google App Engine
This is Rietveld 408576698