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

Unified Diff: runtime/vm/dart_api_impl.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 | « no previous file | runtime/vm/timeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index bd3fe231eb0ce964c8447d190c655743f53c6ae9..901a4c8f7e557477fdc758ae0cdc238cd20371f5 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5985,6 +5985,7 @@ DART_EXPORT void Dart_TimelineEvent(const char* label,
if (event == NULL) {
return;
}
+ label = strdup(label);
switch (type) {
case Dart_Timeline_Event_Begin:
event->Begin(label, timestamp0);
@@ -6013,6 +6014,7 @@ DART_EXPORT void Dart_TimelineEvent(const char* label,
default:
FATAL("Unknown Dart_Timeline_Event_Type");
}
+ event->set_owns_label(true);
event->SetNumArguments(argument_count);
for (intptr_t i = 0; i < argument_count; i++) {
event->CopyArgument(i, argument_names[i], argument_values[i]);
« no previous file with comments | « no previous file | runtime/vm/timeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698