| Index: runtime/vm/service_event.cc
|
| diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
|
| index 502a38bf72c97d4aa4f78f4c2b6657d076ccff30..d34f43981d994fb72688e3bc804e7f86fe12d86e 100644
|
| --- a/runtime/vm/service_event.cc
|
| +++ b/runtime/vm/service_event.cc
|
| @@ -51,8 +51,13 @@ ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind)
|
| bytes_(NULL),
|
| bytes_length_(0),
|
| timestamp_(OS::GetCurrentTimeMillis()) {
|
| - if ((event_kind == ServiceEvent::kPauseStart) ||
|
| - (event_kind == ServiceEvent::kPauseExit)) {
|
| + if ((event_kind == ServiceEvent::kPauseStart) &&
|
| + !isolate->message_handler()->is_paused_on_start()) {
|
| + // We will pause on start but the message handler lacks a valid
|
| + // paused timestamp because we haven't paused yet. Use the current time.
|
| + timestamp_ = OS::GetCurrentTimeMillis();
|
| + } else if ((event_kind == ServiceEvent::kPauseStart) ||
|
| + (event_kind == ServiceEvent::kPauseExit)) {
|
| timestamp_ = isolate->message_handler()->paused_timestamp();
|
| } else if (event_kind == ServiceEvent::kResume) {
|
| timestamp_ = isolate->last_resume_timestamp();
|
|
|