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

Unified Diff: sky/engine/core/script/dart_controller.cc

Issue 941153003: Add dart_invoke to tonic for calls into App code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/core/script/dart_controller.cc
diff --git a/sky/engine/core/script/dart_controller.cc b/sky/engine/core/script/dart_controller.cc
index ecbcad02b91a5f1ee8bb362530aed47a3a71d289..fc30b42ccfb4375092bf8c168515f4c13af3c08a 100644
--- a/sky/engine/core/script/dart_controller.cc
+++ b/sky/engine/core/script/dart_controller.cc
@@ -28,6 +28,7 @@
#include "sky/engine/tonic/dart_class_library.h"
#include "sky/engine/tonic/dart_error.h"
#include "sky/engine/tonic/dart_gc_controller.h"
+#include "sky/engine/tonic/dart_invoke.h"
#include "sky/engine/tonic/dart_isolate_scope.h"
#include "sky/engine/tonic/dart_state.h"
#include "sky/engine/tonic/dart_wrappable.h"
@@ -139,7 +140,7 @@ void DartController::ExecuteLibraryInModule(AbstractModule* module,
// TODO(rmacnak): Dart_LookupFunction won't find re-exports, etc.
Dart_Handle entry = Dart_LookupFunction(library, ToDart(name));
if (module->isApplication()) {
- LogIfError(Dart_Invoke(library, ToDart(name), 0, nullptr));
+ DartInvokeNamedAppClosure(library, ToDart(name), 0, nullptr);
return;
}
@@ -149,7 +150,7 @@ void DartController::ExecuteLibraryInModule(AbstractModule* module,
Dart_Handle args[] = {
ToDart(script),
};
- LogIfError(Dart_Invoke(library, ToDart(name), arraysize(args), args));
+ DartInvokeNamedAppClosure(library, ToDart(name), arraysize(args), args);
}
static void UnhandledExceptionCallback(Dart_Handle error) {

Powered by Google App Engine
This is Rietveld 408576698