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]); |