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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1483113002: Thread and Timeline fixes for Mojo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years 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/dart_api_impl_test.cc » ('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 ddc4591ec468d102924b7dc67f332e7a5ef73884..c3fc98c083f0be0f2cf14ca0ec888a9128437b06 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1289,7 +1289,6 @@ DART_EXPORT Dart_Handle Dart_DebugName() {
}
-
DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) {
CHECK_NO_ISOLATE(Isolate::Current());
// TODO(16615): Validate isolate parameter.
@@ -5728,6 +5727,10 @@ DART_EXPORT bool Dart_TimelineGetTrace(Dart_StreamConsumer consumer,
DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer,
void* user_data) {
+ // To support various embedders, it must be possible to call this function
+ // from a thread for which we have not entered an Isolate and set up a Thread
+ // TLS object. Therefore, a Zone may not be available, a StackZone cannot be
+ // created, and no ZoneAllocated objects can be allocated.
if (consumer == NULL) {
return false;
}
@@ -5736,8 +5739,6 @@ DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer,
// Nothing has been recorded.
return false;
}
- Thread* T = Thread::Current();
- StackZone zone(T);
Timeline::ReclaimCachedBlocksFromThreads();
JSONStream js;
TimelineEventFilter filter;
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698