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..b3de551a046925d0934b46b7fc82b22bae4b2bcc 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -721,3 +721,17 @@ 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. |
+ # - String types (String/AtomicString) represent null as a null string, |
+ # i.e. one for which String::isNull() returns true. |
+ # - Wrapper types (raw pointer or RefPtr/PassRefPtr) represent null as |
+ # a null pointer. |
+ 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 |