Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 1efe2ae0b407958fc4b2e0632e7597f4ae215fe2..cde8404dcc29b914e5e4114c59f918b55892d914 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -1562,7 +1562,14 @@ static void SetStandaloneFlagsViaCommandLine() { |
class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
public: |
- virtual void* Allocate(size_t length) { return malloc(length); } |
+ 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); |
+ } |
virtual void Free(void* data) { free(data); } |
}; |