Index: Source/heap/HeapTest.cpp |
diff --git a/Source/heap/HeapTest.cpp b/Source/heap/HeapTest.cpp |
index c7f3b758084821592ab9b7e1a0acc99ff6d58ef1..597c050f00cb5418eaf17b178eaaa1b5ac8014b4 100644 |
--- a/Source/heap/HeapTest.cpp |
+++ b/Source/heap/HeapTest.cpp |
@@ -284,10 +284,15 @@ private: |
{ |
IntWrapper* wrapper; |
+ typedef Persistent<IntWrapper, GlobalPersistents> GlobalIntWrapperPersistent; |
+ OwnPtr<GlobalIntWrapperPersistent> globalPersistent = adoptPtr(new GlobalIntWrapperPersistent(IntWrapper::create(0x0ed0cabb))); |
+ |
for (int i = 0; i < numberOfAllocations; i++) { |
wrapper = IntWrapper::create(0x0bbac0de); |
- if (!(i % 10)) |
+ if (!(i % 10)) { |
+ globalPersistent = adoptPtr(new GlobalIntWrapperPersistent(IntWrapper::create(0x0ed0cabb))); |
ThreadState::current()->safePoint(ThreadState::HeapPointersOnStack); |
+ } |
yield(); |
} |
@@ -298,6 +303,7 @@ private: |
} |
EXPECT_EQ(wrapper->value(), 0x0bbac0de); |
+ EXPECT_EQ((*globalPersistent)->value(), 0x0ed0cabb); |
} |
yield(); |
} |