| Index: test/cctest/test-heap-profiler.cc
|
| diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
|
| index b96e1615669ef1574aec21ce34d244d23aabc538..9605f70314c6882976811ca50877c1437d1f1c40 100644
|
| --- a/test/cctest/test-heap-profiler.cc
|
| +++ b/test/cctest/test-heap-profiler.cc
|
| @@ -2030,12 +2030,15 @@ TEST(WeakGlobalHandle) {
|
|
|
| CHECK(!HasWeakGlobalHandle());
|
|
|
| - v8::Persistent<v8::Object> handle(env->GetIsolate(),
|
| - v8::Object::New(env->GetIsolate()));
|
| + v8::Persistent<v8::Object> handle;
|
| +
|
| + handle.Reset(env->GetIsolate(), v8::Object::New(env->GetIsolate()));
|
| handle.SetWeak(&handle, PersistentHandleCallback,
|
| v8::WeakCallbackType::kParameter);
|
|
|
| CHECK(HasWeakGlobalHandle());
|
| + CcTest::CollectAllGarbage();
|
| + EmptyMessageQueues(env->GetIsolate());
|
| }
|
|
|
|
|
|
|