| Index: runtime/vm/isolate.cc
|
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
|
| index a2f10ac7b3dc258b8eb58b17bd6cfea3573db904..0d32f427c9c4afa461c864866d4d65d7e05facc0 100644
|
| --- a/runtime/vm/isolate.cc
|
| +++ b/runtime/vm/isolate.cc
|
| @@ -41,8 +41,10 @@ DEFINE_FLAG(bool, report_usage_count, false,
|
| "Track function usage and report.");
|
| DEFINE_FLAG(bool, trace_isolates, false,
|
| "Trace isolate creation and shut down.");
|
| -DEFINE_FLAG(bool, pin_isolates, false,
|
| - "Stop isolates from being destroyed automatically.");
|
| +DEFINE_FLAG(bool, pause_isolates_on_start, false,
|
| + "Pause isolates before starting.");
|
| +DEFINE_FLAG(bool, pause_isolates_on_exit, false,
|
| + "Pause isolates exiting.");
|
|
|
|
|
| void Isolate::RegisterClass(const Class& cls) {
|
| @@ -299,7 +301,6 @@ Isolate::Isolate()
|
| message_notify_callback_(NULL),
|
| name_(NULL),
|
| start_time_(OS::GetCurrentTimeMicros()),
|
| - pin_port_(0),
|
| main_port_(0),
|
| heap_(NULL),
|
| object_store_(NULL),
|
| @@ -436,9 +437,8 @@ Isolate* Isolate::Init(const char* name_prefix) {
|
| result->SetStackLimitFromCurrentTOS(reinterpret_cast<uword>(&result));
|
| result->set_main_port(PortMap::CreatePort(result->message_handler()));
|
| result->BuildName(name_prefix);
|
| - if (FLAG_pin_isolates) {
|
| - result->CreatePinPort();
|
| - }
|
| + result->message_handler()->set_pause_on_start(FLAG_pause_isolates_on_start);
|
| + result->message_handler()->set_pause_on_exit(FLAG_pause_isolates_on_exit);
|
|
|
| result->debugger_ = new Debugger();
|
| result->debugger_->Initialize(result);
|
| @@ -454,28 +454,6 @@ Isolate* Isolate::Init(const char* name_prefix) {
|
| }
|
|
|
|
|
| -void Isolate::CreatePinPort() {
|
| - ASSERT(FLAG_pin_isolates);
|
| - // Only do this once.
|
| - ASSERT(pin_port_ == 0);
|
| - pin_port_ = PortMap::CreatePort(message_handler());
|
| - ASSERT(pin_port_ != 0);
|
| - PortMap::SetLive(pin_port_);
|
| -}
|
| -
|
| -
|
| -void Isolate::ClosePinPort() {
|
| - if (pin_port_ == 0) {
|
| - // Support multiple calls to close.
|
| - return;
|
| - }
|
| - ASSERT(pin_port_ != 0);
|
| - bool r = PortMap::ClosePort(pin_port_);
|
| - ASSERT(r);
|
| - pin_port_ = 0;
|
| -}
|
| -
|
| -
|
| void Isolate::BuildName(const char* name_prefix) {
|
| ASSERT(name_ == NULL);
|
| if (name_prefix == NULL) {
|
| @@ -916,7 +894,16 @@ void Isolate::PrintToJSONStream(JSONStream* stream) {
|
| // inlined frames.
|
| jsobj.AddProperty("depth", (intptr_t)0);
|
| }
|
| -
|
| + intptr_t live_ports = message_handler()->live_ports();
|
| + intptr_t control_ports = message_handler()->control_ports();
|
| + bool paused_on_exit = message_handler()->paused_on_exit();
|
| + bool pause_on_start = message_handler()->pause_on_start();
|
| + bool pause_on_exit = message_handler()->pause_on_exit();
|
| + jsobj.AddProperty("live_ports", live_ports);
|
| + jsobj.AddProperty("control_ports", control_ports);
|
| + jsobj.AddProperty("paused_on_exit", paused_on_exit);
|
| + jsobj.AddProperty("paused_on_start", pause_on_start);
|
| + jsobj.AddProperty("pause_on_exit", pause_on_exit);
|
| const Library& lib =
|
| Library::Handle(object_store()->root_library());
|
| jsobj.AddProperty("rootLib", lib);
|
|
|