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

Unified Diff: runtime/vm/service.h

Issue 871373012: Make service lifecycle checks thread safe (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.h
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 5b6d160a8ca15f02e57d716429d7f84fcbadc6f0..f4b6775909def1ef61776059816b9e2041ec7018 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -38,20 +38,14 @@ class Service : public AllStatic {
static bool SendIsolateStartupMessage();
static bool SendIsolateShutdownMessage();
- static bool IsRunning() {
- return port_ != ILLEGAL_PORT;
- }
-
- static void set_port(Dart_Port port) {
- port_ = port;
- }
+ static bool IsRunning();
+ static void SetServicePort(Dart_Port port);
+ static void SetServiceIsolate(Isolate* isolate);
+ static bool HasServiceIsolate();
+ static bool IsServiceIsolate(Isolate* isolate);
static Dart_Port WaitForLoadPort();
- static bool IsServicePort(Dart_Port port) {
- return (port == port_) || (port == load_port_);
- }
static Dart_Port LoadPort();
-
static void SetLoadPort(Dart_Port port);
static void SetEventMask(uint32_t mask);
@@ -78,10 +72,6 @@ class Service : public AllStatic {
Dart_ServiceRequestCallback callback,
void* user_data);
- static bool IsServiceIsolate(Isolate* isolate) {
- return isolate == service_isolate_;
- }
-
static void SendEchoEvent(Isolate* isolate);
static void SendGraphEvent(Isolate* isolate);
@@ -117,10 +107,11 @@ class Service : public AllStatic {
static EmbedderServiceHandler* isolate_service_handler_head_;
static EmbedderServiceHandler* root_service_handler_head_;
- static Isolate* service_isolate_;
- static Dart_Port port_;
+
static Monitor* monitor_;
static bool initializing_;
+ static Isolate* service_isolate_;
+ static Dart_Port service_port_;
static Dart_Port load_port_;
static uint32_t event_mask_;
};
« no previous file with comments | « no previous file | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698