| Index: test/unittests/test-utils.cc
|
| diff --git a/test/unittests/test-utils.cc b/test/unittests/test-utils.cc
|
| index 7d042151435234c3ee501bb079b401daa41fce39..6ac71d208e6f4c1df34efe81c75d73ba3c02022b 100644
|
| --- a/test/unittests/test-utils.cc
|
| +++ b/test/unittests/test-utils.cc
|
| @@ -13,23 +13,11 @@
|
|
|
| namespace v8 {
|
|
|
| -class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
| - public:
|
| - virtual void* Allocate(size_t length) {
|
| - void* data = AllocateUninitialized(length);
|
| - return data == NULL ? data : memset(data, 0, length);
|
| - }
|
| - virtual void* AllocateUninitialized(size_t length) { return malloc(length); }
|
| - virtual void Free(void* data, size_t) { free(data); }
|
| -};
|
| -
|
| -
|
| // static
|
| -ArrayBufferAllocator* TestWithIsolate::array_buffer_allocator_ = NULL;
|
| +v8::ArrayBuffer::Allocator* TestWithIsolate::array_buffer_allocator_ = nullptr;
|
|
|
| // static
|
| -Isolate* TestWithIsolate::isolate_ = NULL;
|
| -
|
| +Isolate* TestWithIsolate::isolate_ = nullptr;
|
|
|
| TestWithIsolate::TestWithIsolate()
|
| : isolate_scope_(isolate()), handle_scope_(isolate()) {}
|
| @@ -43,7 +31,7 @@ void TestWithIsolate::SetUpTestCase() {
|
| Test::SetUpTestCase();
|
| EXPECT_EQ(NULL, isolate_);
|
| v8::Isolate::CreateParams create_params;
|
| - array_buffer_allocator_ = new ArrayBufferAllocator;
|
| + array_buffer_allocator_ = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
|
| create_params.array_buffer_allocator = array_buffer_allocator_;
|
| isolate_ = v8::Isolate::New(create_params);
|
| EXPECT_TRUE(isolate_ != NULL);
|
|
|