| 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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 static Dart_Port LoadPort(); | 27 static Dart_Port LoadPort(); |
| 28 | 28 |
| 29 static void Run(); | 29 static void Run(); |
| 30 static bool SendIsolateStartupMessage(); | 30 static bool SendIsolateStartupMessage(); |
| 31 static bool SendIsolateShutdownMessage(); | 31 static bool SendIsolateShutdownMessage(); |
| 32 static void SendServiceExitMessage(); | 32 static void SendServiceExitMessage(); |
| 33 static void Shutdown(); | 33 static void Shutdown(); |
| 34 | 34 |
| 35 static void BootVmServiceLibrary(); | 35 static void BootVmServiceLibrary(); |
| 36 | 36 |
| 37 static void SetServerAddress(const char* address); |
| 38 |
| 39 // Returns the server's web address or NULL if none is running. |
| 40 static const char* server_address() { |
| 41 return server_address_; |
| 42 } |
| 43 |
| 37 private: | 44 private: |
| 38 static void KillServiceIsolate(); | 45 static void KillServiceIsolate(); |
| 39 | 46 |
| 40 protected: | 47 protected: |
| 41 static void SetServicePort(Dart_Port port); | 48 static void SetServicePort(Dart_Port port); |
| 42 static void SetServiceIsolate(Isolate* isolate); | 49 static void SetServiceIsolate(Isolate* isolate); |
| 43 static void SetLoadPort(Dart_Port port); | 50 static void SetLoadPort(Dart_Port port); |
| 44 static void ConstructExitMessageAndCache(Isolate* isolate); | 51 static void ConstructExitMessageAndCache(Isolate* isolate); |
| 45 static void FinishedExiting(); | 52 static void FinishedExiting(); |
| 46 static void FinishedInitializing(); | 53 static void FinishedInitializing(); |
| 47 static void MaybeMakeServiceIsolate(Isolate* isolate); | 54 static void MaybeMakeServiceIsolate(Isolate* isolate); |
| 48 static Dart_IsolateCreateCallback create_callback() { | 55 static Dart_IsolateCreateCallback create_callback() { |
| 49 return create_callback_; | 56 return create_callback_; |
| 50 } | 57 } |
| 51 | 58 |
| 52 static Dart_IsolateCreateCallback create_callback_; | 59 static Dart_IsolateCreateCallback create_callback_; |
| 53 static uint8_t* exit_message_; | 60 static uint8_t* exit_message_; |
| 54 static intptr_t exit_message_length_; | 61 static intptr_t exit_message_length_; |
| 55 static Monitor* monitor_; | 62 static Monitor* monitor_; |
| 56 static bool initializing_; | 63 static bool initializing_; |
| 57 static bool shutting_down_; | 64 static bool shutting_down_; |
| 58 static Isolate* isolate_; | 65 static Isolate* isolate_; |
| 59 static Dart_Port port_; | 66 static Dart_Port port_; |
| 60 static Dart_Port load_port_; | 67 static Dart_Port load_port_; |
| 61 static Dart_Port origin_; | 68 static Dart_Port origin_; |
| 69 static char* server_address_; |
| 62 | 70 |
| 63 friend class Dart; | 71 friend class Dart; |
| 64 friend class RunServiceTask; | 72 friend class RunServiceTask; |
| 65 friend class ServiceIsolateNatives; | 73 friend class ServiceIsolateNatives; |
| 66 }; | 74 }; |
| 67 | 75 |
| 68 } // namespace dart | 76 } // namespace dart |
| 69 | 77 |
| 70 #endif // VM_SERVICE_ISOLATE_H_ | 78 #endif // VM_SERVICE_ISOLATE_H_ |
| OLD | NEW |