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

Unified Diff: runtime/vm/timeline.cc

Issue 1968683004: Fix timeline time origin / extent printing with an empty timeline (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/timeline.cc
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 97fdd61772f72cec99feb1a3ee374bf7f8f1c1a1..0ae274ca4c5ccf42540b02cdd841c7493f8f0d18 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -1121,11 +1121,17 @@ void TimelineEventRecorder::ReportTime(int64_t micros) {
int64_t TimelineEventRecorder::TimeOriginMicros() const {
+ if (time_high_micros_ == 0) {
+ return 0;
+ }
return time_low_micros_;
}
int64_t TimelineEventRecorder::TimeExtentMicros() const {
+ if (time_high_micros_ == 0) {
+ return 0;
+ }
return time_high_micros_ - time_low_micros_;
}
« 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