Index: test/fuzzer/fuzzer-support.cc |
diff --git a/test/fuzzer/fuzzer-support.cc b/test/fuzzer/fuzzer-support.cc |
index ea9fb09afdb7b497ed0ed5680a77c1c9d528b91c..936970ee6a75de81ceccaa01cc733533471ed623 100644 |
--- a/test/fuzzer/fuzzer-support.cc |
+++ b/test/fuzzer/fuzzer-support.cc |
@@ -27,16 +27,6 @@ void DeleteFuzzerSupport() { |
} // namespace |
-class FuzzerSupport::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); } |
-}; |
- |
FuzzerSupport::FuzzerSupport(int* argc, char*** argv) { |
v8::internal::FLAG_expose_gc = true; |
v8::V8::SetFlagsFromCommandLine(argc, *argv, true); |
@@ -46,7 +36,7 @@ FuzzerSupport::FuzzerSupport(int* argc, char*** argv) { |
v8::V8::InitializePlatform(platform_); |
v8::V8::Initialize(); |
- allocator_ = new ArrayBufferAllocator; |
+ allocator_ = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); |
v8::Isolate::CreateParams create_params; |
create_params.array_buffer_allocator = allocator_; |
isolate_ = v8::Isolate::New(create_params); |