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

Unified Diff: runtime/vm/timeline.cc

Issue 1882313002: Copy event label. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « runtime/vm/timeline.h ('k') | 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 68e0784d9317f17625fcf556ab4ad7dd58815751..9fd9e21c265420739aac4373c4be7dc816a7610b 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -299,7 +299,10 @@ void TimelineEvent::Reset() {
thread_ = OSThread::kInvalidThreadId;
isolate_id_ = ILLEGAL_PORT;
category_ = "";
- label_ = NULL;
+ if (label_ != NULL) {
+ free(label_);
+ label_ = NULL;
+ }
FreeArguments();
set_pre_serialized_json(false);
set_event_type(kNone);
@@ -498,7 +501,7 @@ void TimelineEvent::Init(EventType event_type,
} else {
isolate_id_ = ILLEGAL_PORT;
}
- label_ = label;
+ label_ = strdup(label);
Cutch 2016/04/14 13:24:29 The timeline was designed to require const char* f
FreeArguments();
set_pre_serialized_json(false);
set_event_type(event_type);
« no previous file with comments | « runtime/vm/timeline.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698