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

Unified Diff: runtime/vm/thread_registry.h

Issue 1294023009: Switch to a VM wide timeline recorder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
Index: runtime/vm/thread_registry.h
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index efe81bdcfa69ca8540760424d8a289bca8943275..286227a2efe34e2be2faab6dccbb9c4b83a8d3a4 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -24,6 +24,8 @@ class ThreadRegistry {
remaining_(0),
round_(0) {}
+ ~ThreadRegistry();
+
// Bring all threads in this isolate to a safepoint. The caller is
// expected to be implicitly at a safepoint. The threads will wait
// until ResumeAllThreads is called. First participates in any
@@ -138,6 +140,9 @@ class ThreadRegistry {
private:
struct Entry {
+ // NOTE: |thread| is deleted automatically when the thread exits.
+ // In other words, it is not safe to dereference |thread| unless you are on
+ // the thread itself.
Thread* thread;
bool scheduled;
Thread::State state;

Powered by Google App Engine
This is Rietveld 408576698