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

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: 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
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index fd2d2c9378652177df8337ac5adf7a77925fe24d..7aa5df857d40ccec9d801830a79d98ace82c47bc 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -170,6 +170,10 @@ if (!isUndefinedOrNull(info[{{argument.index}}]) && !info[{{argument.index}}]->I
}
{% endif %}{# not argument.use_permissive_dictionary_conversion #}
{{argument.v8_value_to_local_cpp_value}};
+{% elif argument.is_explicit_nullable %}
+if (!info[{{argument.index}}]->IsNull()) {
+ {{argument.v8_value_to_local_cpp_value}};
Jens Widell 2015/02/24 14:29:03 This may or may not be the only part that should b
Jens Widell 2015/02/24 14:30:28 To clarify: I think this addition here is probably
+}
{% else %}{# argument.is_nullable #}
{{argument.v8_value_to_local_cpp_value}};
{% endif %}{# argument.is_nullable #}
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698