Index: Source/bindings/scripts/v8_types.py |
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
index df05d16f21b0682b0f6c21204573820cc97882da..8122173ffba98677ec875912491501a44a451d3e 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -477,11 +477,19 @@ def v8_conversion_needs_exception_state(idl_type): |
IdlType.v8_conversion_needs_exception_state = property(v8_conversion_needs_exception_state) |
+TRIVIAL_CONVERSIONS = frozenset([ |
+ 'any', |
+ 'boolean', |
+ 'Dictionary', |
+ 'NodeFilter', |
+ 'XPathNSResolver' |
+]) |
+ |
+ |
def v8_conversion_is_trivial(idl_type): |
# The conversion is a simple expression that returns the converted value and |
# cannot raise an exception. |
- return (idl_type.base_type == 'boolean' or |
- idl_type.base_type == 'Dictionary' or |
+ return (idl_type.base_type in TRIVIAL_CONVERSIONS or |
idl_type.is_wrapper_type) |
IdlType.v8_conversion_is_trivial = property(v8_conversion_is_trivial) |