| Index: third_party/WebKit/Source/platform/heap/HeapCompact.cpp
|
| diff --git a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
|
| index cd95f8c6792aec83fecb30fdee89a791830a6522..995a7d81ee7da83caecf3a89a4a87cc1c74d825c 100644
|
| --- a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
|
| @@ -303,18 +303,12 @@ bool HeapCompact::shouldCompact(ThreadState* state,
|
| reason != BlinkGC::ForcedGC)
|
| return false;
|
|
|
| - const ThreadHeap& heap = state->heap();
|
| - // If any of the participating threads require a stack scan,
|
| - // do not compact.
|
| - //
|
| + // If the GCing thread requires a stack scan, do not compact.
|
| // Why? Should the stack contain an iterator pointing into its
|
| // associated backing store, its references wouldn't be
|
| // correctly relocated.
|
| - for (ThreadState* state : heap.threads()) {
|
| - if (state->stackState() == BlinkGC::HeapPointersOnStack) {
|
| - return false;
|
| - }
|
| - }
|
| + if (state->stackState() == BlinkGC::HeapPointersOnStack)
|
| + return false;
|
|
|
| // Compaction enable rules:
|
| // - It's been a while since the last time.
|
|
|