v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
bounded-size.h
Go to the documentation of this file.
1
// Copyright 2022 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef V8_SANDBOX_BOUNDED_SIZE_H_
6
#define V8_SANDBOX_BOUNDED_SIZE_H_
7
8
#include "
src/common/globals.h
"
9
10
namespace
v8::internal
{
11
12
//
13
// BoundedSize accessors.
14
//
15
// A BoundedSize is just a regular size_t when the sandbox is disabled.
16
// However, when the sandbox is enabled, a BoundedLength is guaranteed to be in
17
// the range [0, kMaxSafeBufferSizeForSandbox]. This property is required to
18
// ensure safe access to variable-sized buffers, in particular ArrayBuffers and
19
// their views, located inside the sandbox.
20
//
21
22
V8_INLINE
size_t
ReadBoundedSizeField
(
Address
field_address);
23
24
V8_INLINE
void
WriteBoundedSizeField
(
Address
field_address,
size_t
value);
25
26
}
// namespace v8::internal
27
28
#endif
// V8_SANDBOX_BOUNDED_SIZE_H_
globals.h
v8::internal
Definition
api-arguments-inl.h:20
v8::internal::ReadBoundedSizeField
V8_INLINE size_t ReadBoundedSizeField(Address field_address)
Definition
bounded-size-inl.h:18
v8::internal::WriteBoundedSizeField
V8_INLINE void WriteBoundedSizeField(Address field_address, size_t value)
Definition
bounded-size-inl.h:27
v8::internal::Address
Address
Definition
api-callbacks-inl.h:36
V8_INLINE
#define V8_INLINE
Definition
v8config.h:500
src
sandbox
bounded-size.h
Generated on Sun Apr 6 2025 21:08:57 for v8 by
1.12.0