| Index: runtime/vm/message_handler.cc
|
| diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
|
| index a6d7da81957f28f95736193f94e93155ea721c51..3990b5795a8a93ef441b521adfebdfe4ac35694f 100644
|
| --- a/runtime/vm/message_handler.cc
|
| +++ b/runtime/vm/message_handler.cc
|
| @@ -346,18 +346,7 @@ void MessageHandler::TaskCallback() {
|
| PausedOnStartLocked(&ml, false);
|
| }
|
| }
|
| - if (is_paused_on_exit()) {
|
| - status = HandleMessages(&ml, false, false);
|
| - if (ShouldPauseOnExit(status)) {
|
| - // Still paused.
|
| - ASSERT(oob_queue_->IsEmpty());
|
| - task_ = NULL; // No task in queue.
|
| - return;
|
| - } else {
|
| - PausedOnExitLocked(&ml, false);
|
| - }
|
| - }
|
| -#endif // !defined(PRODUCT)
|
| +#endif
|
|
|
| if (status == kOK) {
|
| if (start_callback_) {
|
| @@ -384,15 +373,17 @@ void MessageHandler::TaskCallback() {
|
| if (status != kOK || !HasLivePorts()) {
|
| #if !defined(PRODUCT)
|
| if (ShouldPauseOnExit(status)) {
|
| - if (FLAG_trace_service_pause_events) {
|
| - OS::PrintErr(
|
| - "Isolate %s paused before exiting. "
|
| - "Use the Observatory to release it.\n",
|
| - name());
|
| + if (!is_paused_on_exit()) {
|
| + if (FLAG_trace_service_pause_events) {
|
| + OS::PrintErr(
|
| + "Isolate %s paused before exiting. "
|
| + "Use the Observatory to release it.\n",
|
| + name());
|
| + }
|
| + PausedOnExitLocked(&ml, true);
|
| + // More messages may have come in while we released the monitor.
|
| + status = HandleMessages(&ml, false, false);
|
| }
|
| - PausedOnExitLocked(&ml, true);
|
| - // More messages may have come in while we released the monitor.
|
| - status = HandleMessages(&ml, false, false);
|
| if (ShouldPauseOnExit(status)) {
|
| // Still paused.
|
| ASSERT(oob_queue_->IsEmpty());
|
|
|