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

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

Issue 1089853005: prepare to deprecate non phantom weak callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 4b78644b509c300780fd1ddc35842faf1d4beb81..c0a8628214427f9e95dcddd8bcfe6579381b6a53 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -2031,9 +2031,8 @@ bool HasWeakGlobalHandle() {
static void PersistentHandleCallback(
- const v8::WeakCallbackData<v8::Object, v8::Persistent<v8::Object> >& data) {
+ const v8::WeakCallbackInfo<v8::Persistent<v8::Object> >& data) {
data.GetParameter()->Reset();
- delete data.GetParameter();
}
@@ -2045,7 +2044,8 @@ TEST(WeakGlobalHandle) {
v8::Persistent<v8::Object> handle(env->GetIsolate(),
v8::Object::New(env->GetIsolate()));
- handle.SetWeak(&handle, PersistentHandleCallback);
+ handle.SetWeak(&handle, PersistentHandleCallback,
+ v8::WeakCallbackType::kParameter);
CHECK(HasWeakGlobalHandle());
}
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698