| Index: test/cctest/test-mark-compact.cc
|
| diff --git a/test/cctest/test-mark-compact.cc b/test/cctest/test-mark-compact.cc
|
| index 682b3271f86e083e4ee2708f7deec619a94b7d11..949e4138c5acfeda9baac9376c8aedc5a223cbf1 100644
|
| --- a/test/cctest/test-mark-compact.cc
|
| +++ b/test/cctest/test-mark-compact.cc
|
| @@ -304,10 +304,12 @@ TEST(GCCallback) {
|
|
|
|
|
| static int NumberOfWeakCalls = 0;
|
| -static void WeakPointerCallback(v8::Persistent<v8::Value> handle, void* id) {
|
| +static void WeakPointerCallback(v8::Isolate* isolate,
|
| + v8::Persistent<v8::Value> handle,
|
| + void* id) {
|
| ASSERT(id == reinterpret_cast<void*>(1234));
|
| NumberOfWeakCalls++;
|
| - handle.Dispose();
|
| + handle.Dispose(isolate);
|
| }
|
|
|
| TEST(ObjectGroups) {
|
| @@ -326,12 +328,15 @@ TEST(ObjectGroups) {
|
| global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
|
| global_handles->MakeWeak(g1s1.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
| global_handles->MakeWeak(g1s2.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
| global_handles->MakeWeak(g1c1.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
|
|
| Handle<Object> g2s1 =
|
| @@ -342,12 +347,15 @@ TEST(ObjectGroups) {
|
| global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
|
| global_handles->MakeWeak(g2s1.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
| global_handles->MakeWeak(g2s2.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
| global_handles->MakeWeak(g2c1.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
|
|
| Handle<Object> root = global_handles->Create(*g1s1); // make a root.
|
| @@ -377,6 +385,7 @@ TEST(ObjectGroups) {
|
| // Weaken the root.
|
| global_handles->MakeWeak(root.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
| // But make children strong roots---all the objects (except for children)
|
| // should be collectable now.
|
| @@ -405,9 +414,11 @@ TEST(ObjectGroups) {
|
| // And now make children weak again and collect them.
|
| global_handles->MakeWeak(g1c1.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
| global_handles->MakeWeak(g2c1.location(),
|
| reinterpret_cast<void*>(1234),
|
| + NULL,
|
| &WeakPointerCallback);
|
|
|
| HEAP->CollectGarbage(OLD_POINTER_SPACE);
|
|
|