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
9
10namespace 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
22V8_INLINE size_t ReadBoundedSizeField(Address field_address);
23
24V8_INLINE void WriteBoundedSizeField(Address field_address, size_t value);
25
26} // namespace v8::internal
27
28#endif // V8_SANDBOX_BOUNDED_SIZE_H_
V8_INLINE size_t ReadBoundedSizeField(Address field_address)
V8_INLINE void WriteBoundedSizeField(Address field_address, size_t value)
#define V8_INLINE
Definition v8config.h:500