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

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..5b7ca104dfad2c82dece1a54d58540a3936b36e3 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -295,6 +295,9 @@ TimelineEvent::~TimelineEvent() {
void TimelineEvent::Reset() {
+ if (owns_label() && label_ != NULL) {
+ free(const_cast<char*>(label_));
+ }
state_ = 0;
thread_ = OSThread::kInvalidThreadId;
isolate_id_ = ILLEGAL_PORT;
@@ -303,6 +306,7 @@ void TimelineEvent::Reset() {
FreeArguments();
set_pre_serialized_json(false);
set_event_type(kNone);
+ set_owns_label(false);
}
@@ -502,6 +506,7 @@ void TimelineEvent::Init(EventType event_type,
FreeArguments();
set_pre_serialized_json(false);
set_event_type(event_type);
+ set_owns_label(false);
}
« 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