| Index: Source/platform/heap/HeapTest.cpp
|
| diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
|
| index da614ea97fa38df29465fc55727550954b0c2b52..63e794de907cab10110c842f7e45be98e6f11920 100644
|
| --- a/Source/platform/heap/HeapTest.cpp
|
| +++ b/Source/platform/heap/HeapTest.cpp
|
| @@ -4672,8 +4672,6 @@ public:
|
| // shutting it down.
|
| stackPtrValue = reinterpret_cast<uintptr_t>(cto.get());
|
| }
|
| - RELEASE_ASSERT(stackPtrValue);
|
| -
|
| // At this point it is "programatically" okay to shut down the worker thread
|
| // since the cto object should be dead. However out stackPtrValue will cause a
|
| // trace of the object when doing a conservative GC.
|
| @@ -4697,6 +4695,13 @@ public:
|
| EXPECT_EQ(0, CrossThreadObject::s_destructorCalls);
|
| EXPECT_EQ(1, IntWrapper::s_destructorCalls);
|
|
|
| + // This release assert is here to ensure the stackValuePtr is not
|
| + // optimized away before doing the above conservative GC. If the
|
| + // EXPECT_EQ(0, CrossThreadObject::s_destructorCalls) call above
|
| + // starts failing it means we have to find a better way to ensure
|
| + // the stackPtrValue is not optimized away.
|
| + RELEASE_ASSERT(stackPtrValue);
|
| +
|
| // Do a GC with no pointers on the stack to see the cto being collected.
|
| Heap::collectGarbage(ThreadState::NoHeapPointersOnStack);
|
| EXPECT_EQ(1, CrossThreadObject::s_destructorCalls);
|
|
|