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

Unified Diff: runtime/vm/isolate.h

Issue 11442024: Unify specification of file open, close, and write callbacks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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/heap_profiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 6be219391fcc2c25882c81859d01b04aa354581c..6fb8623dd382cd6c5407e66e8d1cecb70ed670a5 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -268,6 +268,24 @@ class Isolate : public BaseIsolate {
return shutdown_callback_;
}
+ static void SetFileCallbacks(Dart_FileOpenCallback file_open,
+ Dart_FileWriteCallback file_write,
+ Dart_FileCloseCallback file_close) {
+ file_open_callback_ = file_open;
+ file_write_callback_ = file_write;
+ file_close_callback_ = file_close;
+ }
+
+ static Dart_FileOpenCallback file_open_callback() {
+ return file_open_callback_;
+ }
+ static Dart_FileWriteCallback file_write_callback() {
+ return file_write_callback_;
+ }
+ static Dart_FileCloseCallback file_close_callback() {
+ return file_close_callback_;
+ }
+
intptr_t* deopt_cpu_registers_copy() const {
return deopt_cpu_registers_copy_;
}
@@ -360,6 +378,9 @@ class Isolate : public BaseIsolate {
static Dart_IsolateInterruptCallback interrupt_callback_;
static Dart_IsolateUnhandledExceptionCallback unhandled_exception_callback_;
static Dart_IsolateShutdownCallback shutdown_callback_;
+ static Dart_FileOpenCallback file_open_callback_;
+ static Dart_FileWriteCallback file_write_callback_;
+ static Dart_FileCloseCallback file_close_callback_;
DISALLOW_COPY_AND_ASSIGN(Isolate);
};
« no previous file with comments | « runtime/vm/heap_profiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698