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

Unified Diff: runtime/vm/timeline.cc

Issue 1644023003: Fix Timeline reporting crash when reusing timeline events with preserialized json (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 76d4729f914ec100343022b0adae14bad41b8b7c..2cf812bceece0f7d77036169aa0ca041db654a14 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -190,12 +190,14 @@ TimelineEvent::~TimelineEvent() {
void TimelineEvent::Reset() {
- set_event_type(kNone);
+ state_ = 0;
thread_ = OSThread::kInvalidThreadId;
isolate_id_ = ILLEGAL_PORT;
category_ = "";
label_ = NULL;
FreeArguments();
+ set_pre_serialized_json(false);
+ set_event_type(kNone);
}
@@ -367,7 +369,7 @@ void TimelineEvent::StreamInit(TimelineStream* stream) {
void TimelineEvent::Init(EventType event_type,
const char* label) {
ASSERT(label != NULL);
- set_event_type(event_type);
+ state_ = 0;
timestamp0_ = 0;
timestamp1_ = 0;
OSThread* os_thread = OSThread::Current();
@@ -381,6 +383,8 @@ void TimelineEvent::Init(EventType event_type,
}
label_ = label;
FreeArguments();
+ set_pre_serialized_json(false);
+ set_event_type(event_type);
}
« 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