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

Unified Diff: runtime/vm/dart.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/vm/coverage.cc ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.h
diff --git a/runtime/vm/dart.h b/runtime/vm/dart.h
index aa43e122b622bc0812cdc51d80f8e8e84381ed5e..afa2499b7ac1abbc6136d60c7b52168a8c5eccad 100644
--- a/runtime/vm/dart.h
+++ b/runtime/vm/dart.h
@@ -26,6 +26,7 @@ class Dart : public AllStatic {
const uint8_t* data_snapshot,
Dart_IsolateCreateCallback create,
Dart_IsolateShutdownCallback shutdown,
+ Dart_ThreadExitCallback thread_exit,
Dart_FileOpenCallback file_open,
Dart_FileReadCallback file_read,
Dart_FileWriteCallback file_write,
@@ -76,6 +77,42 @@ class Dart : public AllStatic {
data_snapshot_buffer_ = buffer;
}
+ static Dart_ThreadExitCallback thread_exit_callback() {
+ return thread_exit_callback_;
+ }
+ static void set_thread_exit_callback(Dart_ThreadExitCallback cback) {
+ thread_exit_callback_ = cback;
+ }
+ static void SetFileCallbacks(Dart_FileOpenCallback file_open,
+ Dart_FileReadCallback file_read,
+ Dart_FileWriteCallback file_write,
+ Dart_FileCloseCallback file_close) {
+ file_open_callback_ = file_open;
+ file_read_callback_ = file_read;
+ file_write_callback_ = file_write;
+ file_close_callback_ = file_close;
+ }
+
+ static Dart_FileOpenCallback file_open_callback() {
+ return file_open_callback_;
+ }
+ static Dart_FileReadCallback file_read_callback() {
+ return file_read_callback_;
+ }
+ static Dart_FileWriteCallback file_write_callback() {
+ return file_write_callback_;
+ }
+ static Dart_FileCloseCallback file_close_callback() {
+ return file_close_callback_;
+ }
+
+ static void set_entropy_source_callback(Dart_EntropySource entropy_source) {
+ entropy_source_callback_ = entropy_source;
+ }
+ static Dart_EntropySource entropy_source_callback() {
+ return entropy_source_callback_;
+ }
+
private:
static void WaitForIsolateShutdown();
@@ -86,6 +123,12 @@ class Dart : public AllStatic {
static ReadOnlyHandles* predefined_handles_;
static const uint8_t* instructions_snapshot_buffer_;
static const uint8_t* data_snapshot_buffer_;
+ static Dart_ThreadExitCallback thread_exit_callback_;
+ static Dart_FileOpenCallback file_open_callback_;
+ static Dart_FileReadCallback file_read_callback_;
+ static Dart_FileWriteCallback file_write_callback_;
+ static Dart_FileCloseCallback file_close_callback_;
+ static Dart_EntropySource entropy_source_callback_;
};
} // namespace dart
« no previous file with comments | « runtime/vm/coverage.cc ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698