Index: Source/platform/heap/Heap.cpp |
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp |
index c8e359c17277a8a700cbd1c404dcbfc10df98b35..3b593341fb132806be33f8dc7cc3c43f01df7149 100644 |
--- a/Source/platform/heap/Heap.cpp |
+++ b/Source/platform/heap/Heap.cpp |
@@ -484,7 +484,9 @@ void HeapObjectHeader::finalize(const GCInfo* gcInfo, Address object, size_t obj |
object[i] = finalizedZapValue; |
// Zap the primary vTable entry (secondary vTable entries are not zapped). |
- *(reinterpret_cast<uintptr_t*>(object)) = zappedVTable; |
+ if (gcInfo->hasVTable()) { |
+ *(reinterpret_cast<uintptr_t*>(object)) = zappedVTable; |
+ } |
#endif |
// In Release builds, the entire object is zeroed out when it is added to the free list. |
// This happens right after sweeping the page and before the thread commences execution. |