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_H_ | 5 #ifndef VM_SERVICE_H_ |
6 #define VM_SERVICE_H_ | 6 #define VM_SERVICE_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" |
(...skipping 20 matching lines...) Expand all Loading... |
31 static void HandleIsolateMessage(Isolate* isolate, const Array& message); | 31 static void HandleIsolateMessage(Isolate* isolate, const Array& message); |
32 | 32 |
33 static Isolate* GetServiceIsolate(void* callback_data); | 33 static Isolate* GetServiceIsolate(void* callback_data); |
34 static bool SendIsolateStartupMessage(); | 34 static bool SendIsolateStartupMessage(); |
35 static bool SendIsolateShutdownMessage(); | 35 static bool SendIsolateShutdownMessage(); |
36 | 36 |
37 static bool IsRunning() { | 37 static bool IsRunning() { |
38 return port_ != ILLEGAL_PORT; | 38 return port_ != ILLEGAL_PORT; |
39 } | 39 } |
40 | 40 |
| 41 static void set_port(Dart_Port port) { |
| 42 port_ = port; |
| 43 } |
| 44 |
41 static void SetEventMask(uint32_t mask); | 45 static void SetEventMask(uint32_t mask); |
42 | 46 |
43 // Is the service interested in debugger events? | 47 // Is the service interested in debugger events? |
44 static bool NeedsDebuggerEvents() { | 48 static bool NeedsDebuggerEvents() { |
45 return IsRunning() && ((event_mask_ & kEventFamilyDebugMask) != 0); | 49 return IsRunning() && ((event_mask_ & kEventFamilyDebugMask) != 0); |
46 } | 50 } |
47 // Is the service interested in garbage collection events? | 51 // Is the service interested in garbage collection events? |
48 static bool NeedsGCEvents() { | 52 static bool NeedsGCEvents() { |
49 return IsRunning() && ((event_mask_ & kEventFamilyGCMask) != 0); | 53 return IsRunning() && ((event_mask_ & kEventFamilyGCMask) != 0); |
50 } | 54 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 98 |
95 static Isolate* service_isolate_; | 99 static Isolate* service_isolate_; |
96 static Dart_LibraryTagHandler embedder_provided_handler_; | 100 static Dart_LibraryTagHandler embedder_provided_handler_; |
97 static Dart_Port port_; | 101 static Dart_Port port_; |
98 static uint32_t event_mask_; | 102 static uint32_t event_mask_; |
99 }; | 103 }; |
100 | 104 |
101 } // namespace dart | 105 } // namespace dart |
102 | 106 |
103 #endif // VM_SERVICE_H_ | 107 #endif // VM_SERVICE_H_ |
OLD | NEW |