| 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());
|
| }
|
|
|