Index: Source/heap/Heap.cpp |
diff --git a/Source/heap/Heap.cpp b/Source/heap/Heap.cpp |
index 88a6e8b80c33a29950e8fc8b1f2d68fcd3092d4e..bfd702bace91671b75961b82fdc7251bc6ee165d 100644 |
--- a/Source/heap/Heap.cpp |
+++ b/Source/heap/Heap.cpp |
@@ -1305,6 +1305,8 @@ void Heap::prepareForGC() |
void Heap::collectGarbage(ThreadState::StackState stackState, GCType gcType) |
{ |
+ if (gcType == ForcedForTesting && stackState != ThreadState::NoHeapPointersOnStack) |
+ ThreadState::current()->setForcedForTesting(true); |
ThreadState::current()->clearGCRequested(); |
GCScope gcScope(stackState); |