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

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

Issue 382833003: Revert of IDL: Treat undefined as missing for optional arguments with defaults (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 141e5d6fc4aeba76507bcc6e9e7d6d64846d59dc..71336908ed341d74bd1d874fd74ebef9069038cb 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -70,7 +70,7 @@
{% endif %}
{% for argument in method.arguments %}
{% if argument.default_value %}
- if (!info[{{argument.index}}]->IsUndefined()) {
+ if (info.Length() > {{argument.index}}) {
{{generate_argument(method, argument, world_suffix) | indent(8)}}
} else {
{{argument.name}} = {{argument.default_value}};

Powered by Google App Engine
This is Rietveld 408576698