Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 01f23aa133f7204e75c4ffd5f7b78e9b5a82aeb4..2c286e3f0bf3b4ff5d2e28b7f8d9aaff576c6e86 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -322,8 +322,8 @@ static bool WeakPointerCleared = false; |
static void TestWeakGlobalHandleCallback(v8::Persistent<v8::Value> handle, |
void* id) { |
- USE(handle); |
if (1234 == reinterpret_cast<intptr_t>(id)) WeakPointerCleared = true; |
+ handle.Dispose(); |
} |
@@ -398,17 +398,8 @@ TEST(WeakGlobalHandlesMark) { |
CHECK(WeakPointerCleared); |
CHECK(!GlobalHandles::IsNearDeath(h1.location())); |
- CHECK(GlobalHandles::IsNearDeath(h2.location())); |
GlobalHandles::Destroy(h1.location()); |
- GlobalHandles::Destroy(h2.location()); |
-} |
- |
-static void TestDeleteWeakGlobalHandleCallback( |
- v8::Persistent<v8::Value> handle, |
- void* id) { |
- if (1234 == reinterpret_cast<intptr_t>(id)) WeakPointerCleared = true; |
- handle.Dispose(); |
} |
TEST(DeleteWeakGlobalHandle) { |
@@ -427,7 +418,7 @@ TEST(DeleteWeakGlobalHandle) { |
GlobalHandles::MakeWeak(h.location(), |
reinterpret_cast<void*>(1234), |
- &TestDeleteWeakGlobalHandleCallback); |
+ &TestWeakGlobalHandleCallback); |
// Scanvenge does not recognize weak reference. |
Heap::PerformScavenge(); |