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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/service_event.h" 5 #include "vm/service_event.h"
6 6
7 #include "vm/message_handler.h" 7 #include "vm/message_handler.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 top_frame_(NULL), 44 top_frame_(NULL),
45 timeline_event_block_(NULL), 45 timeline_event_block_(NULL),
46 extension_rpc_(NULL), 46 extension_rpc_(NULL),
47 exception_(NULL), 47 exception_(NULL),
48 at_async_jump_(false), 48 at_async_jump_(false),
49 inspectee_(NULL), 49 inspectee_(NULL),
50 gc_stats_(NULL), 50 gc_stats_(NULL),
51 bytes_(NULL), 51 bytes_(NULL),
52 bytes_length_(0), 52 bytes_length_(0),
53 timestamp_(OS::GetCurrentTimeMillis()) { 53 timestamp_(OS::GetCurrentTimeMillis()) {
54 if ((event_kind == ServiceEvent::kPauseStart) || 54 if ((event_kind == ServiceEvent::kPauseStart) &&
55 (event_kind == ServiceEvent::kPauseExit)) { 55 !isolate->message_handler()->is_paused_on_start()) {
56 // We will pause on start but the message handler lacks a valid
57 // paused timestamp because we haven't paused yet. Use the current time.
58 timestamp_ = OS::GetCurrentTimeMillis();
59 } else if ((event_kind == ServiceEvent::kPauseStart) ||
60 (event_kind == ServiceEvent::kPauseExit)) {
56 timestamp_ = isolate->message_handler()->paused_timestamp(); 61 timestamp_ = isolate->message_handler()->paused_timestamp();
57 } else if (event_kind == ServiceEvent::kResume) { 62 } else if (event_kind == ServiceEvent::kResume) {
58 timestamp_ = isolate->last_resume_timestamp(); 63 timestamp_ = isolate->last_resume_timestamp();
59 } 64 }
60 } 65 }
61 66
62 67
63 ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event) 68 ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event)
64 : isolate_(debugger_event->isolate()), 69 : isolate_(debugger_event->isolate()),
65 kind_(TranslateEventKind(debugger_event->type())), 70 kind_(TranslateEventKind(debugger_event->type())),
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } else { 284 } else {
280 jsobj->AddProperty("isolate", isolate()); 285 jsobj->AddProperty("isolate", isolate());
281 } 286 }
282 ASSERT(timestamp_ != -1); 287 ASSERT(timestamp_ != -1);
283 jsobj->AddPropertyTimeMillis("timestamp", timestamp_); 288 jsobj->AddPropertyTimeMillis("timestamp", timestamp_);
284 } 289 }
285 290
286 #endif // !PRODUCT 291 #endif // !PRODUCT
287 292
288 } // namespace dart 293 } // namespace dart
OLDNEW
« 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