Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: test/cctest/test-heap.cc

Issue 14908004: add weakcallback without persistent copying (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: missed some instances Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 2669269b7096aa6cfbf2ec43e4172ebf2fb6187a..1de24ce88d4b62857859757698590d06133bf312 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -396,10 +396,10 @@ TEST(GlobalHandles) {
static bool WeakPointerCleared = false;
static void TestWeakGlobalHandleCallback(v8::Isolate* isolate,
- v8::Persistent<v8::Value> handle,
+ v8::Persistent<v8::Value>* handle,
void* id) {
if (1234 == reinterpret_cast<intptr_t>(id)) WeakPointerCleared = true;
- handle.Dispose(isolate);
+ handle->Dispose(isolate);
}
@@ -427,8 +427,8 @@ TEST(WeakGlobalHandlesScavenge) {
global_handles->MakeWeak(h2.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &TestWeakGlobalHandleCallback);
+ &TestWeakGlobalHandleCallback,
+ NULL);
// Scavenge treats weak pointers as normal roots.
heap->PerformScavenge();
@@ -474,8 +474,8 @@ TEST(WeakGlobalHandlesMark) {
global_handles->MakeWeak(h2.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &TestWeakGlobalHandleCallback);
+ &TestWeakGlobalHandleCallback,
+ NULL);
CHECK(!GlobalHandles::IsNearDeath(h1.location()));
CHECK(!GlobalHandles::IsNearDeath(h2.location()));
@@ -511,8 +511,8 @@ TEST(DeleteWeakGlobalHandle) {
global_handles->MakeWeak(h.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &TestWeakGlobalHandleCallback);
+ &TestWeakGlobalHandleCallback,
+ NULL);
// Scanvenge does not recognize weak reference.
heap->PerformScavenge();
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698