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

Side by Side Diff: vm/dart.h

Issue 10450016: Add a callback to inform embedders when an isolate is being shut down. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/dart_api.h ('k') | vm/dart.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_DART_H_ 5 #ifndef VM_DART_H_
6 #define VM_DART_H_ 6 #define VM_DART_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 // Forward declarations. 13 // Forward declarations.
14 class DebugInfo; 14 class DebugInfo;
15 class Isolate; 15 class Isolate;
16 class RawError; 16 class RawError;
17 class ThreadPool; 17 class ThreadPool;
18 18
19 class Dart : public AllStatic { 19 class Dart : public AllStatic {
20 public: 20 public:
21 static bool InitOnce(Dart_IsolateCreateCallback create, 21 static bool InitOnce(Dart_IsolateCreateCallback create,
22 Dart_IsolateInterruptCallback interrupt); 22 Dart_IsolateInterruptCallback interrupt,
23 Dart_IsolateShutdownCallback shutdown);
23 24
24 static Isolate* CreateIsolate(const char* name_prefix); 25 static Isolate* CreateIsolate(const char* name_prefix);
25 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data); 26 static RawError* InitializeIsolate(const uint8_t* snapshot, void* data);
26 static void ShutdownIsolate(); 27 static void ShutdownIsolate();
27 28
28 static Isolate* vm_isolate() { return vm_isolate_; } 29 static Isolate* vm_isolate() { return vm_isolate_; }
29 static ThreadPool* thread_pool() { return thread_pool_; } 30 static ThreadPool* thread_pool() { return thread_pool_; }
30 31
31 static void set_pprof_symbol_generator(DebugInfo* value) { 32 static void set_pprof_symbol_generator(DebugInfo* value) {
32 pprof_symbol_generator_ = value; 33 pprof_symbol_generator_ = value;
33 } 34 }
34 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; } 35 static DebugInfo* pprof_symbol_generator() { return pprof_symbol_generator_; }
35 36
36 private: 37 private:
37 static Isolate* vm_isolate_; 38 static Isolate* vm_isolate_;
38 static ThreadPool* thread_pool_; 39 static ThreadPool* thread_pool_;
39 static DebugInfo* pprof_symbol_generator_; 40 static DebugInfo* pprof_symbol_generator_;
40 }; 41 };
41 42
42 } // namespace dart 43 } // namespace dart
43 44
44 #endif // VM_DART_H_ 45 #endif // VM_DART_H_
OLDNEW
« no previous file with comments | « include/dart_api.h ('k') | vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698