OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_SERVICE_ISOLATE_H_ | 5 #ifndef VM_SERVICE_ISOLATE_H_ |
6 #define VM_SERVICE_ISOLATE_H_ | 6 #define VM_SERVICE_ISOLATE_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
11 #include "vm/os_thread.h" | 11 #include "vm/os_thread.h" |
12 | 12 |
13 namespace dart { | 13 namespace dart { |
14 | 14 |
15 class ServiceIsolate : public AllStatic { | 15 class ServiceIsolate : public AllStatic { |
16 public: | 16 public: |
17 static const char* kName; | 17 static const char* kName; |
18 static bool NameEquals(const char* name); | 18 static bool NameEquals(const char* name); |
19 | 19 |
20 static bool Exists(); | 20 static bool Exists(); |
21 static bool IsRunning(); | 21 static bool IsRunning(); |
22 static bool IsServiceIsolate(Isolate* isolate); | 22 static bool IsServiceIsolate(Isolate* isolate); |
| 23 static bool IsServiceIsolateDescendant(Isolate* isolate); |
23 static Dart_Port Port(); | 24 static Dart_Port Port(); |
24 | 25 |
25 static Dart_Port WaitForLoadPort(); | 26 static Dart_Port WaitForLoadPort(); |
26 static Dart_Port LoadPort(); | 27 static Dart_Port LoadPort(); |
27 | 28 |
28 static void Run(); | 29 static void Run(); |
29 static bool SendIsolateStartupMessage(); | 30 static bool SendIsolateStartupMessage(); |
30 static bool SendIsolateShutdownMessage(); | 31 static bool SendIsolateShutdownMessage(); |
31 static void SendServiceExitMessage(); | 32 static void SendServiceExitMessage(); |
32 static void Shutdown(); | 33 static void Shutdown(); |
(...skipping 16 matching lines...) Expand all Loading... |
49 | 50 |
50 static Dart_IsolateCreateCallback create_callback_; | 51 static Dart_IsolateCreateCallback create_callback_; |
51 static uint8_t* exit_message_; | 52 static uint8_t* exit_message_; |
52 static intptr_t exit_message_length_; | 53 static intptr_t exit_message_length_; |
53 static Monitor* monitor_; | 54 static Monitor* monitor_; |
54 static bool initializing_; | 55 static bool initializing_; |
55 static bool shutting_down_; | 56 static bool shutting_down_; |
56 static Isolate* isolate_; | 57 static Isolate* isolate_; |
57 static Dart_Port port_; | 58 static Dart_Port port_; |
58 static Dart_Port load_port_; | 59 static Dart_Port load_port_; |
| 60 static Dart_Port origin_; |
59 | 61 |
60 friend class Dart; | 62 friend class Dart; |
61 friend class RunServiceTask; | 63 friend class RunServiceTask; |
62 friend class ServiceIsolateNatives; | 64 friend class ServiceIsolateNatives; |
63 }; | 65 }; |
64 | 66 |
65 } // namespace dart | 67 } // namespace dart |
66 | 68 |
67 #endif // VM_SERVICE_ISOLATE_H_ | 69 #endif // VM_SERVICE_ISOLATE_H_ |
OLD | NEW |