Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: runtime/vm/service_event.cc

Issue 1814493002: Attempt to fix flaky service test debug build failures (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698