Index: Source/platform/heap/HeapTest.cpp |
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp |
index c36cf9191d2e4705be01fe3c6ca608758538c6ed..6870d7aad2f911ea5b97a417205ad6a3074a3853 100644 |
--- a/Source/platform/heap/HeapTest.cpp |
+++ b/Source/platform/heap/HeapTest.cpp |
@@ -1841,6 +1841,15 @@ TEST(HeapTest, LargeObjects) |
{ |
int slack = 8; // LargeObject points to an IntWrapper that is also allocated. |
Persistent<LargeObject> object = LargeObject::create(); |
+ EXPECT_TRUE(ThreadState::current()->contains(object)); |
+ EXPECT_TRUE(ThreadState::current()->contains(reinterpret_cast<char*>(object.get()) + sizeof(LargeObject) - 1)); |
+#if ENABLE(GC_TRACING) |
+ const GCInfo* info = ThreadState::current()->findGCInfo(reinterpret_cast<Address>(object.get())); |
+ EXPECT_NE(reinterpret_cast<const GCInfo*>(0), info); |
+ EXPECT_EQ(info, ThreadState::current()->findGCInfo(reinterpret_cast<Address>(object.get()) + sizeof(LargeObject) - 1)); |
+ EXPECT_NE(info, ThreadState::current()->findGCInfo(reinterpret_cast<Address>(object.get()) + sizeof(LargeObject))); |
+ EXPECT_NE(info, ThreadState::current()->findGCInfo(reinterpret_cast<Address>(object.get()) - 1)); |
+#endif |
HeapStats afterAllocation; |
clearOutOldGarbage(&afterAllocation); |
{ |