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

Unified Diff: runtime/vm/thread.cc

Issue 1263513002: VM: Load allocation-top and -end via Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed cc tests 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.cc
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index bbdd1b401859582a0217cf7ffae509277f385b0c..a79b086b7e5c0b587049a5e48c17b71d8c18d9ff 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -140,6 +140,8 @@ void Thread::EnterIsolate(Isolate* isolate) {
isolate->set_vm_tag(VMTag::kVMTagId);
ASSERT(thread->store_buffer_block_ == NULL);
thread->store_buffer_block_ = isolate->store_buffer()->PopBlock();
+ ASSERT(isolate->heap() != NULL);
+ thread->heap_ = isolate->heap();
thread->Schedule(isolate);
}
@@ -163,6 +165,7 @@ void Thread::ExitIsolate() {
isolate->set_mutator_thread(NULL);
thread->isolate_ = NULL;
ASSERT(Isolate::Current() == NULL);
+ thread->heap_ = NULL;
}
@@ -171,6 +174,8 @@ void Thread::EnterIsolateAsHelper(Isolate* isolate) {
ASSERT(thread != NULL);
ASSERT(thread->isolate() == NULL);
thread->isolate_ = isolate;
+ ASSERT(isolate->heap() != NULL);
+ thread->heap_ = isolate->heap();
// Do not update isolate->mutator_thread, but perform sanity check:
// this thread should not be both the main mutator and helper.
ASSERT(isolate->mutator_thread() != thread);
@@ -187,6 +192,7 @@ void Thread::ExitIsolateAsHelper() {
ASSERT(isolate != NULL);
thread->Unschedule();
thread->isolate_ = NULL;
+ thread->heap_ = NULL;
ASSERT(isolate->mutator_thread() != thread);
}
« runtime/vm/isolate.h ('K') | « runtime/vm/thread.h ('k') | runtime/vm/thread_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698