7#ifndef FXJS_CFX_V8_ARRAY_BUFFER_ALLOCATOR_H_
8#define FXJS_CFX_V8_ARRAY_BUFFER_ALLOCATOR_H_
14#include "v8/include/v8-array-buffer.h"
16class CFX_V8ArrayBufferAllocator
final :
public v8::ArrayBuffer::Allocator {
25 void*
Allocate(size_t length)
override;
27 void Free(
void* data, size_t length)
override;
29#ifdef V8_ENABLE_SANDBOX
31 std::unique_ptr<v8::ArrayBuffer::Allocator> wrapped_;
void Free(void *data, size_t length) override
void * AllocateUninitialized(size_t length) override
CFX_V8ArrayBufferAllocator(CFX_V8ArrayBufferAllocator &&)=delete
void * Allocate(size_t length) override
static const size_t kMaxAllowedBytes
CFX_V8ArrayBufferAllocator()
CFX_V8ArrayBufferAllocator(const CFX_V8ArrayBufferAllocator &)=delete
~CFX_V8ArrayBufferAllocator() override
void FX_ArrayBufferFree(void *data)