summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfx_v8.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/fxjs/cfx_v8.cpp b/fxjs/cfx_v8.cpp
index 26c9a43988..4d12e3353e 100644
--- a/fxjs/cfx_v8.cpp
+++ b/fxjs/cfx_v8.cpp
@@ -206,10 +206,8 @@ v8::Local<v8::Array> CFX_V8::ToArray(v8::Local<v8::Value> pValue) {
void* CFX_V8ArrayBufferAllocator::Allocate(size_t length) {
if (length > kMaxAllowedBytes)
return nullptr;
- void* p = AllocateUninitialized(length);
- if (p)
- memset(p, 0, length);
- return p;
+ return gArrayBufferPartitionAllocator.root()->AllocFlags(
+ pdfium::base::PartitionAllocZeroFill, length, "CFX_V8ArrayBuffer");
}
void* CFX_V8ArrayBufferAllocator::AllocateUninitialized(size_t length) {