| Index: Source/platform/heap/Heap.cpp
|
| diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp
|
| index d1f421585fb0f096e10c0b5788c4f529fdfcdc4b..430e1121cd22fee3d4651aea19f3667277737c7f 100644
|
| --- a/Source/platform/heap/Heap.cpp
|
| +++ b/Source/platform/heap/Heap.cpp
|
| @@ -1882,7 +1882,8 @@ void Heap::collectGarbage(ThreadState::StackState stackState, ThreadState::GCTyp
|
| // the GC.
|
| if (!gcScope.allThreadsParked()) {
|
| // Restore the original GCState.
|
| - state->setGCState(originalGCState);
|
| + if (LIKELY(state->gcState() == ThreadState::StoppingOtherThreads))
|
| + state->setGCState(originalGCState);
|
| return;
|
| }
|
|
|
|
|