Index: Source/bindings/scripts/v8_types.py |
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
index c6b78508e771247cf1e8f1c22f97500f8f87e93a..c14d2de4f3534e84d8beae18b40b1f06e476831e 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -889,6 +889,8 @@ IdlTypeBase.cpp_value_to_v8_value = cpp_value_to_v8_value |
def literal_cpp_value(idl_type, idl_literal): |
"""Converts an expression that is a valid C++ literal for this type.""" |
# FIXME: add validation that idl_type and idl_literal are compatible |
+ if idl_type.base_type in ('any', 'object') and idl_literal.is_null: |
+ return 'ScriptValue()' |
literal_value = str(idl_literal) |
if idl_type.base_type in CPP_UNSIGNED_TYPES: |
return literal_value + 'u' |