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

Side by Side Diff: runtime/vm/service_isolate.h

Issue 1053713003: Do not register service isolate descendants with service (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
OLDNEW
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();
25 static Dart_Port Origin();
turnidge 2015/04/01 19:57:34 Does this need to be provided?
Cutch 2015/04/01 20:19:04 Done.
24 26
25 static Dart_Port WaitForLoadPort(); 27 static Dart_Port WaitForLoadPort();
26 static Dart_Port LoadPort(); 28 static Dart_Port LoadPort();
27 29
28 static void Run(); 30 static void Run();
29 static bool SendIsolateStartupMessage(); 31 static bool SendIsolateStartupMessage();
30 static bool SendIsolateShutdownMessage(); 32 static bool SendIsolateShutdownMessage();
31 static void SendServiceExitMessage(); 33 static void SendServiceExitMessage();
32 static void Shutdown(); 34 static void Shutdown();
33 35
34 protected: 36 protected:
37 static void SetOrigin(Dart_Port origin);
35 static void SetServicePort(Dart_Port port); 38 static void SetServicePort(Dart_Port port);
36 static void SetServiceIsolate(Isolate* isolate); 39 static void SetServiceIsolate(Isolate* isolate);
37 static void SetLoadPort(Dart_Port port); 40 static void SetLoadPort(Dart_Port port);
38 static void ConstructExitMessageAndCache(Isolate* isolate); 41 static void ConstructExitMessageAndCache(Isolate* isolate);
39 static void FinishedExiting(); 42 static void FinishedExiting();
40 static void FinishedInitializing(); 43 static void FinishedInitializing();
41 static void MaybeInjectVMServiceLibrary(Isolate* isolate); 44 static void MaybeInjectVMServiceLibrary(Isolate* isolate);
42 static Dart_IsolateCreateCallback create_callback() { 45 static Dart_IsolateCreateCallback create_callback() {
43 return create_callback_; 46 return create_callback_;
44 } 47 }
45 48
46 static Dart_Handle GetSource(const char* name); 49 static Dart_Handle GetSource(const char* name);
47 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library, 50 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library,
48 Dart_Handle url); 51 Dart_Handle url);
49 52
50 static Dart_IsolateCreateCallback create_callback_; 53 static Dart_IsolateCreateCallback create_callback_;
51 static uint8_t* exit_message_; 54 static uint8_t* exit_message_;
52 static intptr_t exit_message_length_; 55 static intptr_t exit_message_length_;
53 static Monitor* monitor_; 56 static Monitor* monitor_;
54 static bool initializing_; 57 static bool initializing_;
55 static bool shutting_down_; 58 static bool shutting_down_;
56 static Isolate* isolate_; 59 static Isolate* isolate_;
57 static Dart_Port port_; 60 static Dart_Port port_;
58 static Dart_Port load_port_; 61 static Dart_Port load_port_;
62 static Dart_Port origin_;
59 63
60 friend class Dart; 64 friend class Dart;
61 friend class RunServiceTask; 65 friend class RunServiceTask;
62 friend class ServiceIsolateNatives; 66 friend class ServiceIsolateNatives;
63 }; 67 };
64 68
65 } // namespace dart 69 } // namespace dart
66 70
67 #endif // VM_SERVICE_ISOLATE_H_ 71 #endif // VM_SERVICE_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698