| Index: lib/dom/scripts/systemnative.py
|
| diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py
|
| index 1bb37dababd0662acf49a120d7935b6d55c6a9ac..13445af9b29852a8feaf122623dab99ee6aed73a 100644
|
| --- a/lib/dom/scripts/systemnative.py
|
| +++ b/lib/dom/scripts/systemnative.py
|
| @@ -70,9 +70,11 @@ class NativeImplementationSystem(System):
|
| if operation.type.id == 'void':
|
| return_type = 'void'
|
| return_prefix = ''
|
| + error_return = ''
|
| else:
|
| return_type = 'bool'
|
| return_prefix = 'return '
|
| + error_return = ' false'
|
|
|
| parameters = []
|
| arguments = []
|
| @@ -80,7 +82,7 @@ class NativeImplementationSystem(System):
|
| argument_type_info = GetIDLTypeInfo(argument.type.id)
|
| parameters.append('%s %s' % (argument_type_info.parameter_type(),
|
| argument.id))
|
| - arguments.append(argument.id)
|
| + arguments.append(argument_type_info.to_dart_conversion(argument.id))
|
| cpp_impl_includes |= set(argument_type_info.conversion_includes())
|
|
|
| cpp_header_handlers_emitter.Emit(
|
| @@ -92,11 +94,16 @@ class NativeImplementationSystem(System):
|
| '\n'
|
| '$TYPE $CLASS_NAME::handleEvent($PARAMETERS)\n'
|
| '{\n'
|
| + ' if (!m_callback.isolate()->isAlive())\n'
|
| + ' return$ERROR_RETURN;\n'
|
| + ' DartIsolate::Scope scope(m_callback.isolate());\n'
|
| + ' DartApiScope apiScope;\n'
|
| ' $(RETURN_PREFIX)m_callback.handleEvent($ARGUMENTS);\n'
|
| '}\n',
|
| TYPE=return_type,
|
| CLASS_NAME=class_name,
|
| PARAMETERS=', '.join(parameters),
|
| + ERROR_RETURN=error_return,
|
| RETURN_PREFIX=return_prefix,
|
| ARGUMENTS=', '.join(arguments))
|
|
|
|
|