Chromium Code Reviews| Index: runtime/vm/isolate.h |
| diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h |
| index b8e7a4ca40fa254765ca3b75f3fc121eb9d50362..e8496114494d72ecccfc24385227db0c2fda8538 100644 |
| --- a/runtime/vm/isolate.h |
| +++ b/runtime/vm/isolate.h |
| @@ -759,6 +759,15 @@ class Isolate : public BaseIsolate { |
| mutator_thread_->set_zone(zone); |
| } |
| + // The isolates_list_monitor_ should be held when calling Kill(). |
| + void Kill(); |
|
Ivan Posva
2015/09/14 21:52:13
Since Kill assumes the the monitor is locked then
zra
2015/09/14 22:59:00
Done.
|
| + |
| + static void KillAllIsolates(); |
| + static void KillIfExists(Isolate* isolate); |
| + |
| + static void DisableIsolateCreation(); |
| + static void EnableIsolateCreation(); |
| + |
| private: |
| friend class Dart; // Init, InitOnce, Shutdown. |
| @@ -768,6 +777,7 @@ class Isolate : public BaseIsolate { |
| static Isolate* Init(const char* name_prefix, |
| const Dart_IsolateFlags& api_flags, |
| bool is_vm_isolate = false); |
| + void LowLevelShutdown(); |
| void Shutdown(); |
| void BuildName(const char* name_prefix); |
| @@ -962,11 +972,13 @@ 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 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; |