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

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

Issue 954723002: [bindings] Support is_explicit_nullable for method arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments addressed! Created 5 years, 10 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 a06d29fffe7e5052dbd875a753b17541839bcfd2..600c47c59fd883ad96083861819c47cfd6841faf 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -178,6 +178,10 @@ if (!isUndefinedOrNull(info[{{argument.index}}]) && !info[{{argument.index}}]->I
}
{% endif %}{# not argument.use_permissive_dictionary_conversion #}
{{v8_value_to_local_cpp_value(argument)}}
+{% elif argument.is_explicit_nullable %}
+if (!info[{{argument.index}}]->IsNull()) {
+ {{v8_value_to_local_cpp_value(argument) | indent }}
Jens Widell 2015/03/02 07:53:13 Nit: there should be no space between "indent" and
+}
{% else %}{# argument.is_nullable #}
{{v8_value_to_local_cpp_value(argument)}}
{% endif %}{# argument.is_nullable #}

Powered by Google App Engine
This is Rietveld 408576698