Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 0a25473aabd089d59f48d3d6d40b86d9fbbdada3..01ed58accef6608c1cda1b02d640abeeefdc0ca4 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -5958,7 +5958,7 @@ DART_EXPORT void Dart_TimelineEvent(const char* label, |
if (type < Dart_Timeline_Event_Begin) { |
return; |
} |
- if (type > Dart_Timeline_Event_Metadata) { |
+ if (type > Dart_Timeline_Event_Counter) { |
return; |
} |
TimelineStream* stream = Timeline::GetEmbedderStream(); |
@@ -5992,9 +5992,6 @@ DART_EXPORT void Dart_TimelineEvent(const char* label, |
case Dart_Timeline_Event_Counter: |
event->Counter(label, timestamp0); |
break; |
- case Dart_Timeline_Event_Metadata: |
- event->Metadata(label, timestamp0); |
- break; |
default: |
FATAL("Unknown Dart_Timeline_Event_Type"); |
} |
@@ -6006,6 +6003,16 @@ DART_EXPORT void Dart_TimelineEvent(const char* label, |
} |
+DART_EXPORT void Dart_SetThreadName(const char* name) { |
+ OSThread* thread = OSThread::Current(); |
+ if (thread == NULL) { |
+ // VM is shutting down. |
+ return; |
+ } |
+ thread->SetName(name); |
+} |
+ |
+ |
// The precompiler is included in dart_bootstrap and dart_noopt, and |
// excluded from dart and dart_precompiled_runtime. |
#if !defined(DART_PRECOMPILER) |