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

Unified Diff: runtime/vm/thread_registry.cc

Issue 1473403003: Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review Created 5 years, 1 month 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
« runtime/vm/thread_registry.h ('K') | « runtime/vm/thread_registry.h ('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.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_) {
« runtime/vm/thread_registry.h ('K') | « runtime/vm/thread_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698