| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index bd6108c0a082821e8434269776bd27c32afa6bda..82b93c95cd0feb7f529ca2a18b295b3e4ae77e31 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -8015,9 +8015,10 @@ TEST(DontLeakGlobalObjects) {
|
| v8::Persistent<v8::Object> some_object;
|
| v8::Persistent<v8::Object> bad_handle;
|
|
|
| -void NewPersistentHandleCallback(v8::Persistent<v8::Value>, void*) {
|
| +void NewPersistentHandleCallback(v8::Persistent<v8::Value> handle, void*) {
|
| v8::HandleScope scope;
|
| bad_handle = v8::Persistent<v8::Object>::New(some_object);
|
| + handle.Dispose();
|
| }
|
|
|
|
|
| @@ -8046,6 +8047,7 @@ v8::Persistent<v8::Object> to_be_disposed;
|
| void DisposeAndForceGcCallback(v8::Persistent<v8::Value> handle, void*) {
|
| to_be_disposed.Dispose();
|
| i::Heap::CollectAllGarbage(false);
|
| + handle.Dispose();
|
| }
|
|
|
|
|
| @@ -8070,6 +8072,7 @@ void DisposingCallback(v8::Persistent<v8::Value> handle, void*) {
|
| void HandleCreatingCallback(v8::Persistent<v8::Value> handle, void*) {
|
| v8::HandleScope scope;
|
| v8::Persistent<v8::Object>::New(v8::Object::New());
|
| + handle.Dispose();
|
| }
|
|
|
|
|
|
|