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); |
+ |
/* |
* ======== |