Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1412)

Unified Diff: sky/engine/bindings/scripts/templates/methods_cpp.template

Issue 1190123003: Decouple Canvas from DisplayList and map Picture and PictureRecorder more directly to their Skia co… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebased version of previous patch Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698