mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
Fix race in debug assertion.
Change order of initialization for the two-way pointers between Isolate and Thread. This only affects the debug assertion in Isolate::mutator_thread(). R=iposva@google.com Review URL: https://codereview.chromium.org//1138643006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45814 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
7344dcc35c
commit
c026736cff
1 changed files with 1 additions and 1 deletions
|
@ -51,6 +51,7 @@ void Thread::EnterIsolate(Isolate* isolate) {
|
|||
Thread* thread = Thread::Current();
|
||||
ASSERT(thread->isolate() == NULL);
|
||||
ASSERT(isolate->mutator_thread() == NULL);
|
||||
thread->isolate_ = isolate;
|
||||
isolate->set_mutator_thread(thread);
|
||||
// TODO(koda): Migrate thread_state_ and profile_data_ to Thread, to allow
|
||||
// helper threads concurrent with mutator.
|
||||
|
@ -64,7 +65,6 @@ void Thread::EnterIsolate(Isolate* isolate) {
|
|||
Profiler::BeginExecution(isolate);
|
||||
isolate->set_thread_state(thread_state);
|
||||
isolate->set_vm_tag(VMTag::kVMTagId);
|
||||
thread->isolate_ = isolate;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue