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

Unified Diff: runtime/vm/thread_registry.h

Issue 1233563004: Avoid race in isolate shutdown; add assertions, error messages (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Move wait per suggestion; port to all platforms. Created 5 years, 5 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 | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_registry.h
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index d4de8a3fa469bca7fffb194ccf1713f27baf2ee8..af160269fa33ad7d2207229bdaa13115df81573f 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -63,6 +63,19 @@ class ThreadRegistry {
return (FindEntry(thread) != NULL);
}
+ void CheckNotScheduled(Isolate* isolate) {
+ MutexLocker ml(mutex_);
+ for (int i = 0; i < entries_.length(); ++i) {
+ const Entry& entry = entries_[i];
+ if (entry.scheduled) {
+ FATAL3("Isolate %p still scheduled on %p (whose isolate_ is %p)\n",
+ isolate,
+ entry.thread,
+ entry.thread->isolate());
+ }
+ }
+ }
+
void VisitObjectPointers(ObjectPointerVisitor* visitor) {
MutexLocker ml(mutex_);
for (int i = 0; i < entries_.length(); ++i) {
« no previous file with comments | « runtime/vm/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698