| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index 396d68b7fa98ecb4db7c6d09bfc80494cf00d975..b8e4492908a4db9bdd60809eb8124d11a3051cd6 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -1612,20 +1612,10 @@ static void DumpHeapConstants(i::Isolate* isolate) {
|
| class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
| public:
|
| virtual void* Allocate(size_t length) {
|
| - void* result = malloc(length);
|
| - memset(result, 0, length);
|
| - return result;
|
| - }
|
| - virtual void* AllocateUninitialized(size_t length) {
|
| - return malloc(length);
|
| + return memset(AllocateUninitialized(length), 0, length);
|
| }
|
| + virtual void* AllocateUninitialized(size_t length) { return malloc(length); }
|
| virtual void Free(void* data, size_t) { free(data); }
|
| - // TODO(dslomov): Remove when v8:2823 is fixed.
|
| - virtual void Free(void* data) {
|
| -#ifndef V8_SHARED
|
| - UNREACHABLE();
|
| -#endif
|
| - }
|
| };
|
|
|
|
|
|
|