| Index: runtime/vm/scavenger.cc
|
| diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
|
| index 60478d3d5b645b7b8fc9c24dd03037c69862a5e7..5dc0aae609ee1ac723c0c291b762ee94ef073035 100644
|
| --- a/runtime/vm/scavenger.cc
|
| +++ b/runtime/vm/scavenger.cc
|
| @@ -14,6 +14,7 @@
|
| #include "vm/lockers.h"
|
| #include "vm/object.h"
|
| #include "vm/object_id_ring.h"
|
| +#include "vm/safepoint.h"
|
| #include "vm/stack_frame.h"
|
| #include "vm/store_buffer.h"
|
| #include "vm/thread_registry.h"
|
| @@ -449,7 +450,7 @@ SemiSpace* Scavenger::Prologue(Isolate* isolate, bool invoke_api_callbacks) {
|
| if (invoke_api_callbacks && (isolate->gc_prologue_callback() != NULL)) {
|
| (isolate->gc_prologue_callback())();
|
| }
|
| - isolate->thread_registry()->PrepareForGC();
|
| + isolate->PrepareForGC();
|
| // Flip the two semi-spaces so that to_ is always the space for allocating
|
| // objects.
|
| SemiSpace* from = to_;
|
| @@ -763,7 +764,7 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
|
| // will continue with its scavenge after waiting for the winner to complete.
|
| // TODO(koda): Consider moving SafepointThreads into allocation failure/retry
|
| // logic to avoid needless collections.
|
| - isolate->thread_registry()->SafepointThreads();
|
| + SafepointOperationScope safepoint_scope(Thread::Current());
|
|
|
| // Scavenging is not reentrant. Make sure that is the case.
|
| ASSERT(!scavenging_);
|
| @@ -823,8 +824,6 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
|
| // Done scavenging. Reset the marker.
|
| ASSERT(scavenging_);
|
| scavenging_ = false;
|
| -
|
| - isolate->thread_registry()->ResumeAllThreads();
|
| }
|
|
|
|
|
|
|