| Index: Source/bindings/scripts/unstable/v8_callback_interface.py
|
| diff --git a/Source/bindings/scripts/unstable/v8_callback_interface.py b/Source/bindings/scripts/unstable/v8_callback_interface.py
|
| index 31da8cf4380e8eb0cf10d207b7b7d4ff8ea168d9..2e310d19a10498a5a1d604e36eaf24b406b4711f 100644
|
| --- a/Source/bindings/scripts/unstable/v8_callback_interface.py
|
| +++ b/Source/bindings/scripts/unstable/v8_callback_interface.py
|
| @@ -45,9 +45,9 @@ CALLBACK_INTERFACE_H_INCLUDES = set([
|
| 'bindings/v8/ScopedPersistent.h',
|
| ])
|
| CALLBACK_INTERFACE_CPP_INCLUDES = set([
|
| - 'core/dom/ExecutionContext.h',
|
| 'bindings/v8/V8Binding.h',
|
| 'bindings/v8/V8Callback.h',
|
| + 'core/dom/ExecutionContext.h',
|
| 'wtf/Assertions.h',
|
| ])
|
|
|
| @@ -67,6 +67,8 @@ def cpp_type(idl_type):
|
| # (always use usual v8_types.cpp_type)
|
| if idl_type == 'DOMString':
|
| return 'const String&'
|
| + if idl_type == 'void':
|
| + return 'void'
|
| # Callbacks use raw pointers, so used_as_argument=True
|
| usual_cpp_type = v8_types.cpp_type(idl_type, used_as_argument=True)
|
| if usual_cpp_type.startswith('Vector'):
|
| @@ -100,8 +102,8 @@ def add_includes_for_operation(operation):
|
| def generate_method(operation):
|
| extended_attributes = operation.extended_attributes
|
| idl_type = operation.idl_type
|
| - if idl_type != 'boolean':
|
| - raise Exception("We don't yet support callbacks that return non-boolean values.")
|
| + if idl_type not in ['boolean', 'void']:
|
| + raise Exception('We only support callbacks that return boolean or void values.')
|
| is_custom = 'Custom' in extended_attributes
|
| if not is_custom:
|
| add_includes_for_operation(operation)
|
| @@ -112,6 +114,7 @@ def generate_method(operation):
|
| 'custom': is_custom,
|
| 'name': operation.name,
|
| 'return_cpp_type': cpp_type(idl_type),
|
| + 'return_idl_type': idl_type,
|
| }
|
| contents.update(generate_arguments_contents(operation.arguments, call_with_this_handle))
|
| return contents
|
|
|