Index: runtime/vm/isolate.h |
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
index 990d2339cb0632d122158610da12a7f96057e78e..54d8120285f03ef4273d8430ce49126c0c179309 100644 |
--- a/runtime/vm/isolate.h |
+++ b/runtime/vm/isolate.h |
@@ -754,6 +754,14 @@ class Isolate : public BaseIsolate { |
mutator_thread_->set_zone(zone); |
} |
+ static void KillIsolate(Isolate* isolate); |
+ static void KillAllIsolates(); |
+ |
+ static void DisableIsolateCreation(); |
+ static void EnableIsolateCreation(); |
+ |
+ static int IsolateCount(); |
+ |
private: |
explicit Isolate(const Dart_IsolateFlags& api_flags); |
@@ -914,12 +922,14 @@ class Isolate : public BaseIsolate { |
static void WakePauseEventHandler(Dart_Isolate isolate); |
// Manage list of existing isolates. |
- static void AddIsolateTolist(Isolate* isolate); |
+ static bool AddIsolateToList(Isolate* isolate); |
static void RemoveIsolateFromList(Isolate* isolate); |
static void CheckForDuplicateThreadState(InterruptableThreadState* state); |
- static Monitor* isolates_list_monitor_; // Protects isolates_list_head_ |
+ // This monitor protects isolates_list_head_, and creation_enabled_. |
+ static Monitor* isolates_list_monitor_; |
static Isolate* isolates_list_head_; |
+ static bool creation_enabled_; |
#define REUSABLE_FRIEND_DECLARATION(name) \ |
friend class Reusable##name##HandleScope; |