Chromium Code Reviews| Index: runtime/vm/thread.cc |
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
| index db6f42e20438db6f2820330a6119baddf98e748a..305d0569eb03a64115ff3c8a8745b7e8c7213c33 100644 |
| --- a/runtime/vm/thread.cc |
| +++ b/runtime/vm/thread.cc |
| @@ -236,16 +236,13 @@ void Thread::ExitIsolateAsHelper(bool bypass_safepoint) { |
| } |
| -// TODO(koda): Make non-static and invoke in SafepointThreads. |
| void Thread::PrepareForGC() { |
|
siva
2015/12/18 01:05:02
ASSERT(isolate()->thread_registry()->AtSafepoint()
Ivan Posva
2015/12/18 03:59:50
Done.
|
| - Thread* thread = Thread::Current(); |
| - // Prevent scheduling another GC. |
| - thread->StoreBufferRelease(StoreBuffer::kIgnoreThreshold); |
| + // Prevent scheduling another GC by ignoring the threshold. |
| + StoreBufferRelease(StoreBuffer::kIgnoreThreshold); |
| // Make sure to get an *empty* block; the isolate needs all entries |
| // at GC time. |
| // TODO(koda): Replace with an epilogue (PrepareAfterGC) that acquires. |
| - thread->store_buffer_block_ = |
| - thread->isolate()->store_buffer()->PopEmptyBlock(); |
| + store_buffer_block_ = isolate()->store_buffer()->PopEmptyBlock(); |
| } |
| @@ -274,7 +271,7 @@ void Thread::StoreBufferAddObjectGC(RawObject* obj) { |
| void Thread::StoreBufferRelease(StoreBuffer::ThresholdPolicy policy) { |
| StoreBufferBlock* block = store_buffer_block_; |
| store_buffer_block_ = NULL; |
| - isolate_->store_buffer()->PushBlock(block, policy); |
| + isolate()->store_buffer()->PushBlock(block, policy); |
| } |