| Index: sky/engine/bindings/scripts/templates/methods_cpp.template
|
| diff --git a/sky/engine/bindings/scripts/templates/methods_cpp.template b/sky/engine/bindings/scripts/templates/methods_cpp.template
|
| index 06eb5fe9a07036bc3a550e6c7686987f571784cf..c074f3f5080266405d7c942ea56417016343edaa 100644
|
| --- a/sky/engine/bindings/scripts/templates/methods_cpp.template
|
| +++ b/sky/engine/bindings/scripts/templates/methods_cpp.template
|
| @@ -335,9 +335,11 @@ static void {{static_method_name(constructor.name, overload_index)}}(Dart_Native
|
| ExceptionState es;
|
| {% endif %}
|
| {{generate_arguments(constructor) | indent(8)}}
|
| + {# TODO(iansf): The following line is incorrect if the constructor throws an exception. In that case, we should not call AssociateWithDartWrapper, as the constructor may have returned a nullptr. #}
|
| {{constructor.cpp_value}}->AssociateWithDartWrapper(args);
|
| {% if constructor.has_exception_state %}
|
| if (es.had_exception()) {
|
| + {# TODO(iansf): The following line does not work in the case that an exception was thrown. Investigate why. #}
|
| exception = es.GetDartException(args, {{constructor.auto_scope}});
|
| goto fail;
|
| }
|
|
|