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

Unified Diff: test/cctest/test-mark-compact.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-heap-profiler.cc ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-mark-compact.cc
diff --git a/test/cctest/test-mark-compact.cc b/test/cctest/test-mark-compact.cc
index e0e506c9a54a0eabcee9afa639b931468975a81b..2cb4646d5a8209a06d5116b61b5e10d18f35ce31 100644
--- a/test/cctest/test-mark-compact.cc
+++ b/test/cctest/test-mark-compact.cc
@@ -304,11 +304,11 @@ TEST(GCCallback) {
static int NumberOfWeakCalls = 0;
static void WeakPointerCallback(v8::Isolate* isolate,
- v8::Persistent<v8::Value> handle,
+ v8::Persistent<v8::Value>* handle,
void* id) {
ASSERT(id == reinterpret_cast<void*>(1234));
NumberOfWeakCalls++;
- handle.Dispose(isolate);
+ handle->Dispose(isolate);
}
TEST(ObjectGroups) {
@@ -327,16 +327,16 @@ TEST(ObjectGroups) {
global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
global_handles->MakeWeak(g1s1.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
global_handles->MakeWeak(g1s2.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
global_handles->MakeWeak(g1c1.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
Handle<Object> g2s1 =
global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
@@ -346,16 +346,16 @@ TEST(ObjectGroups) {
global_handles->Create(HEAP->AllocateFixedArray(1)->ToObjectChecked());
global_handles->MakeWeak(g2s1.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
global_handles->MakeWeak(g2s2.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
global_handles->MakeWeak(g2c1.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
Handle<Object> root = global_handles->Create(*g1s1); // make a root.
@@ -384,8 +384,8 @@ TEST(ObjectGroups) {
// Weaken the root.
global_handles->MakeWeak(root.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
// But make children strong roots---all the objects (except for children)
// should be collectable now.
global_handles->ClearWeakness(g1c1.location());
@@ -413,12 +413,12 @@ TEST(ObjectGroups) {
// And now make children weak again and collect them.
global_handles->MakeWeak(g1c1.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
global_handles->MakeWeak(g2c1.location(),
reinterpret_cast<void*>(1234),
- NULL,
- &WeakPointerCallback);
+ &WeakPointerCallback,
+ NULL);
HEAP->CollectGarbage(OLD_POINTER_SPACE);
CHECK_EQ(7, NumberOfWeakCalls);
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/cctest/test-weakmaps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698