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

Unified Diff: runtime/include/dart_api.h

Issue 1807293002: - Fix for issue 25950 (add registration of a thread exit callback) (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-review-comments Created 4 years, 9 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
« no previous file with comments | « runtime/bin/run_vm_tests.cc ('k') | runtime/lib/math.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « runtime/bin/run_vm_tests.cc ('k') | runtime/lib/math.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698