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

Unified Diff: Source/bindings/scripts/v8_types.py

Issue 385603002: IDL: Support using nullable on any method return type (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/scripts/v8_types.py
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py
index dbcd013375241d57a6034168c3eae62c1d9f28c9..17aac7f25aa6465b5b21a8a970945812d1af9967 100644
--- a/Source/bindings/scripts/v8_types.py
+++ b/Source/bindings/scripts/v8_types.py
@@ -721,3 +721,13 @@ def literal_cpp_value(idl_type, idl_literal):
return literal_value
IdlType.literal_cpp_value = literal_cpp_value
+
+
+def is_nullable_simple(idl_type):
+ # Nullable type where the corresponding C++ type supports a null value.
haraken 2014/07/10 14:43:57 Let's add a comment about what C++ type supports i
Jens Widell 2014/07/10 14:56:44 Done.
+ return idl_type.is_nullable and (
+ (idl_type.is_string_type or idl_type.is_wrapper_type) and
+ not idl_type.native_array_element_type)
+
+IdlType.is_nullable_simple = property(is_nullable_simple)
+IdlUnionType.is_nullable_simple = False

Powered by Google App Engine
This is Rietveld 408576698