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

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

Issue 12033011: Add Isolate parameter to Persistent class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added new kind of callback Created 7 years, 11 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
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 8da841e3e8d021985587d31b91636dc37a89c043..64a2b4eac57068eeced7e7f555fa148d0335bb5f 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -1478,8 +1478,10 @@ bool HasWeakGlobalHandle() {
}
-static void PersistentHandleCallback(v8::Persistent<v8::Value> handle, void*) {
- handle.Dispose();
+static void PersistentHandleCallback(v8::Isolate* isolate,
+ v8::Persistent<v8::Value> handle,
+ void*) {
+ handle.Dispose(isolate);
}
@@ -1491,7 +1493,7 @@ TEST(WeakGlobalHandle) {
v8::Persistent<v8::Object> handle =
v8::Persistent<v8::Object>::New(v8::Object::New());
- handle.MakeWeak(NULL, PersistentHandleCallback);
+ handle.MakeWeak(env->GetIsolate(), NULL, PersistentHandleCallback);
CHECK(HasWeakGlobalHandle());
}
@@ -1584,13 +1586,13 @@ TEST(PersistentHandleCount) {
v8::HeapProfiler::GetPersistentHandleCount());
// Dipose the persistent handles in a different order.
- p_AAA.Dispose();
+ p_AAA.Dispose(env->GetIsolate());
CHECK_EQ(global_handle_count + 2,
v8::HeapProfiler::GetPersistentHandleCount());
- p_CCC.Dispose();
+ p_CCC.Dispose(env->GetIsolate());
CHECK_EQ(global_handle_count + 1,
v8::HeapProfiler::GetPersistentHandleCount());
- p_BBB.Dispose();
+ p_BBB.Dispose(env->GetIsolate());
CHECK_EQ(global_handle_count, v8::HeapProfiler::GetPersistentHandleCount());
}

Powered by Google App Engine
This is Rietveld 408576698