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

Unified Diff: runtime/vm/dart.cc

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/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 5c6abe562fca11c3395ed591467214a1c9f2af6b..d37c2d76ac2effa682675213c78c5428ba41f75e 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -29,9 +29,8 @@ DECLARE_FLAG(bool, trace_isolates);
Isolate* Dart::vm_isolate_ = NULL;
ThreadPool* Dart::thread_pool_ = NULL;
-Dart_FileWriterFunction Dart::perf_events_writer_ = NULL;
+void* Dart::perf_events_file_ = NULL;
DebugInfo* Dart::pprof_symbol_generator_ = NULL;
-Dart_FileWriterFunction Dart::flow_graph_writer_ = NULL;
// An object visitor which will mark all visited objects. This is used to
// premark all objects in the vm_isolate_ heap.
@@ -52,11 +51,15 @@ class PremarkingVisitor : public ObjectVisitor {
const char* Dart::InitOnce(Dart_IsolateCreateCallback create,
Dart_IsolateInterruptCallback interrupt,
Dart_IsolateUnhandledExceptionCallback unhandled,
- Dart_IsolateShutdownCallback shutdown) {
+ Dart_IsolateShutdownCallback shutdown,
+ Dart_FileOpenCallback file_open,
+ Dart_FileWriteCallback file_write,
+ Dart_FileCloseCallback file_close) {
// TODO(iposva): Fix race condition here.
if (vm_isolate_ != NULL || !Flags::Initialized()) {
return "VM already initialized.";
}
+ Isolate::SetFileCallbacks(file_open, file_write, file_close);
OS::InitOnce();
VirtualMemory::InitOnce();
Isolate::InitOnce();
« no previous file with comments | « runtime/vm/dart.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698