summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/js-array-buffer.tq
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2022-04-12 11:10:15 +0200
committerMichaël Zasso <targos@protonmail.com>2022-04-12 22:08:39 +0200
commitfd4f80ce54d7f7b7503e0999f6a9d293d493846d (patch)
tree00fba34b8aabeb481c7128fccee635719ee44a3b /deps/v8/src/objects/js-array-buffer.tq
parent73d53fe9f56d7ce5de4b9c9ad5257dc601bbce14 (diff)
downloadnode-new-fd4f80ce54d7f7b7503e0999f6a9d293d493846d.tar.gz
deps: update V8 to 10.1.124.6
PR-URL: https://github.com/nodejs/node/pull/42657 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'deps/v8/src/objects/js-array-buffer.tq')
-rw-r--r--deps/v8/src/objects/js-array-buffer.tq27
1 files changed, 22 insertions, 5 deletions
diff --git a/deps/v8/src/objects/js-array-buffer.tq b/deps/v8/src/objects/js-array-buffer.tq
index 7fb62b0bb2..d00febb179 100644
--- a/deps/v8/src/objects/js-array-buffer.tq
+++ b/deps/v8/src/objects/js-array-buffer.tq
@@ -11,10 +11,11 @@ bitfield struct JSArrayBufferFlags extends uint32 {
is_resizable: bool: 1 bit;
}
-extern class JSArrayBuffer extends JSObject {
+extern class JSArrayBuffer extends JSObjectWithEmbedderSlots {
byte_length: uintptr;
max_byte_length: uintptr;
- backing_store: ExternalPointer;
+ // A SandboxedPtr if the sandbox is enabled
+ backing_store: RawPtr;
extension: RawPtr;
bit_field: JSArrayBufferFlags;
// Pads header size to be a multiple of kTaggedSize.
@@ -52,7 +53,7 @@ bitfield struct JSArrayBufferViewFlags extends uint32 {
}
@abstract
-extern class JSArrayBufferView extends JSObject {
+extern class JSArrayBufferView extends JSObjectWithEmbedderSlots {
buffer: JSArrayBuffer;
byte_offset: uintptr;
byte_length: uintptr;
@@ -72,9 +73,24 @@ macro IsLengthTrackingJSArrayBufferView(array: JSArrayBufferView): bool {
return array.bit_field.is_length_tracking;
}
+extern macro LoadVariableLengthJSArrayBufferViewByteLength(
+ JSArrayBufferView, JSArrayBuffer): uintptr labels DetachedOrOutOfBounds;
+
+macro LoadJSArrayBufferViewByteLength(
+ view: JSArrayBufferView,
+ buffer: JSArrayBuffer): uintptr labels DetachedOrOutOfBounds {
+ if (IsVariableLengthJSArrayBufferView(view)) {
+ return LoadVariableLengthJSArrayBufferViewByteLength(view, buffer)
+ otherwise DetachedOrOutOfBounds;
+ }
+ if (IsDetachedBuffer(buffer)) goto DetachedOrOutOfBounds;
+ return view.byte_length;
+}
+
extern class JSTypedArray extends JSArrayBufferView {
length: uintptr;
- external_pointer: ExternalPointer;
+ // A SandboxedPtr if the sandbox is enabled
+ external_pointer: RawPtr;
base_pointer: ByteArray|Smi;
}
@@ -85,7 +101,8 @@ macro IsOnHeapTypedArray(array: JSTypedArray): bool {
}
extern class JSDataView extends JSArrayBufferView {
- data_pointer: ExternalPointer;
+ // A SandboxedPtr if the sandbox is enabled
+ data_pointer: RawPtr;
}
@abstract