| Index: runtime/vm/thread_registry.cc
|
| diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
|
| index 6031366895be857a0855147128a8516c55c818a5..264b844f453d716f9a4653a07b4807ae44baad2d 100644
|
| --- a/runtime/vm/thread_registry.cc
|
| +++ b/runtime/vm/thread_registry.cc
|
| @@ -87,6 +87,7 @@ Thread* ThreadRegistry::Schedule(Isolate* isolate,
|
| thread = mutator_thread_;
|
| } else {
|
| thread = GetThreadFromFreelist(isolate);
|
| + ASSERT(thread->api_top_scope() == NULL);
|
| }
|
| thread->isolate_ = isolate;
|
| thread->heap_ = isolate->heap();
|
| @@ -111,6 +112,7 @@ void ThreadRegistry::Unschedule(Thread* thread,
|
| os_thread->set_thread(NULL);
|
| OSThread::SetCurrent(os_thread);
|
| if (!is_mutator) {
|
| + ASSERT(thread->api_top_scope() == NULL);
|
| ReturnThreadToFreelist(thread);
|
| }
|
| if (!bypass_safepoint && in_rendezvous_) {
|
|
|