Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cfx_v8_array_buffer_allocator.h
Go to the documentation of this file.
1
// Copyright 2021 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
FXJS_CFX_V8_ARRAY_BUFFER_ALLOCATOR_H_
8
#
define
FXJS_CFX_V8_ARRAY_BUFFER_ALLOCATOR_H_
9
10
#
include
<
stddef
.
h
>
11
12
#
include
<
memory
>
13
14
#
include
"v8/include/v8-array-buffer.h"
15
16
class
CFX_V8ArrayBufferAllocator
final
:
public
v8::ArrayBuffer::Allocator {
17
public
:
18
static
const
size_t
kMaxAllowedBytes
= 0x10000000;
19
20
CFX_V8ArrayBufferAllocator
();
21
CFX_V8ArrayBufferAllocator
(
const
CFX_V8ArrayBufferAllocator&) =
delete
;
22
CFX_V8ArrayBufferAllocator
(CFX_V8ArrayBufferAllocator&&) =
delete
;
23
~
CFX_V8ArrayBufferAllocator
()
override
;
24
25
void
*
Allocate
(size_t length)
override
;
26
void
*
AllocateUninitialized
(size_t length)
override
;
27
void
Free
(
void
* data, size_t length)
override
;
28
29
#
ifdef
V8_ENABLE_SANDBOX
30
private
:
31
std::unique_ptr<v8::ArrayBuffer::Allocator> wrapped_;
32
#
endif
// V8_ENABLE_SANDBOX
33
};
34
35
#
endif
// FXJS_CFX_V8_ARRAY_BUFFER_ALLOCATOR_H_
CFX_V8ArrayBufferAllocator::Free
void Free(void *data, size_t length) override
Definition
cfx_v8_array_buffer_allocator.cpp:45
CFX_V8ArrayBufferAllocator::AllocateUninitialized
void * AllocateUninitialized(size_t length) override
Definition
cfx_v8_array_buffer_allocator.cpp:32
CFX_V8ArrayBufferAllocator::CFX_V8ArrayBufferAllocator
CFX_V8ArrayBufferAllocator(CFX_V8ArrayBufferAllocator &&)=delete
CFX_V8ArrayBufferAllocator::Allocate
void * Allocate(size_t length) override
Definition
cfx_v8_array_buffer_allocator.cpp:19
CFX_V8ArrayBufferAllocator::kMaxAllowedBytes
static const size_t kMaxAllowedBytes
Definition
cfx_v8_array_buffer_allocator.h:18
CFX_V8ArrayBufferAllocator::CFX_V8ArrayBufferAllocator
CFX_V8ArrayBufferAllocator()
CFX_V8ArrayBufferAllocator::CFX_V8ArrayBufferAllocator
CFX_V8ArrayBufferAllocator(const CFX_V8ArrayBufferAllocator &)=delete
CFX_V8ArrayBufferAllocator::~CFX_V8ArrayBufferAllocator
~CFX_V8ArrayBufferAllocator() override
FX_ArrayBufferFree
void FX_ArrayBufferFree(void *data)
Definition
fx_memory_malloc.cpp:87
qtwebengine
src
3rdparty
chromium
third_party
pdfium
fxjs
cfx_v8_array_buffer_allocator.h
Generated on
for Qt by
1.18.0