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

Unified Diff: runtime/include/dart_api.h

Issue 2933603002: 1. Dynamic compute the main closure that needs to be run by the main isolate (Closed)
Patch Set: Address review comments. Created 3 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: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 51b96038a57f0bb74c5798640461f0216667a545..2e8b8648097332cbdc1483f794d49cc2af4ff02b 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1611,6 +1611,20 @@ DART_EXPORT Dart_Handle Dart_NewDouble(double value);
*/
DART_EXPORT Dart_Handle Dart_DoubleValue(Dart_Handle double_obj, double* value);
+/**
+ * Returns a closure of top level function 'function_name' in the exported
+ * namespace of specified 'library'. If a top level function 'function_name'
+ * does not exist, looks for a top level getter 'function_name' and invokes
+ * it and returns the object returned by the getter.
+ *
+ * \param library Library object
+ * \param function_name Name of the top level function
+ *
+ * \return A valid Dart instance if no error occurs during the operation.
+ */
+DART_EXPORT Dart_Handle Dart_GetClosure(Dart_Handle library,
+ Dart_Handle function_name);
+
/*
* ========
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/tests/vm/vm.status » ('j') | tests/co19/co19-kernel.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698