Index: runtime/include/dart_api.h |
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
index 77d128994cc9bb26822d488000badd1ce292a21c..6665e0a010ee62ece628e7c82ad2953d58158cbe 100755 |
--- a/runtime/include/dart_api.h |
+++ b/runtime/include/dart_api.h |
@@ -721,6 +721,15 @@ typedef void (*Dart_IsolateUnhandledExceptionCallback)(Dart_Handle error); |
typedef void (*Dart_IsolateShutdownCallback)(void* callback_data); |
/** |
+ * A thread death callback function. |
+ * This callback, provided by the embedder, is called before a thread in the |
+ * vm thread pool exits. |
+ * This function could be used to dispose of native resources that |
+ * are associated and attached to the thread, in order to avoid leaks. |
+ */ |
+typedef void (*Dart_ThreadExitCallback)(); |
+ |
+/** |
* Callbacks provided by the embedder for file operations. If the |
* embedder does not allow file operations these callbacks can be |
* NULL. |
@@ -802,6 +811,7 @@ DART_EXPORT char* Dart_Initialize( |
Dart_IsolateInterruptCallback interrupt, |
Dart_IsolateUnhandledExceptionCallback unhandled_exception, |
Dart_IsolateShutdownCallback shutdown, |
+ Dart_ThreadExitCallback thread_exit, |
Dart_FileOpenCallback file_open, |
Dart_FileReadCallback file_read, |
Dart_FileWriteCallback file_write, |