summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2021-09-17 14:34:02 +0200
committerMichaël Zasso <targos@protonmail.com>2021-10-02 08:40:27 +0200
commit4f722915218862b108c90371503d26a3fe89f4c9 (patch)
treecd1577faff9acc20eb8e4a0e2d6ed1856bf308fd /deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js
parent606bb521591a29df5401732bfbd19c1e31239ed9 (diff)
downloadnode-new-4f722915218862b108c90371503d26a3fe89f4c9.tar.gz
deps: update V8 to 9.4.146.18
PR-URL: https://github.com/nodejs/node/pull/39945 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js')
-rw-r--r--deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js b/deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js
index 95e2a99ecd..69ad91e693 100644
--- a/deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js
+++ b/deps/v8/test/mjsunit/typedarray-resizablearraybuffer-detach.js
@@ -22,8 +22,12 @@ const ctors = [
MyUint8Array
];
+function CreateResizableArrayBuffer(byteLength, maxByteLength) {
+ return new ArrayBuffer(byteLength, {maxByteLength: maxByteLength});
+}
+
(function ConstructorThrowsIfBufferDetached() {
- const rab = new ResizableArrayBuffer(40, 80);
+ const rab = CreateResizableArrayBuffer(40, 80);
%ArrayBufferDetach(rab);
for (let ctor of ctors) {
@@ -34,7 +38,7 @@ const ctors = [
})();
(function TypedArrayLengthAndByteLength() {
- const rab = new ResizableArrayBuffer(40, 80);
+ const rab = CreateResizableArrayBuffer(40, 80);
let tas = [];
for (let ctor of ctors) {
@@ -53,7 +57,7 @@ const ctors = [
})();
(function AccessDetachedTypedArray() {
- const rab = new ResizableArrayBuffer(16, 40);
+ const rab = CreateResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4);
@@ -90,7 +94,7 @@ const ctors = [
}
%EnsureFeedbackVectorForFunction(ReadElement2);
- const rab = new ResizableArrayBuffer(16, 40);
+ const rab = CreateResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4);
assertEquals(0, ReadElement2(i8a));
@@ -114,7 +118,7 @@ const ctors = [
}
%EnsureFeedbackVectorForFunction(WriteElement2);
- const rab = new ResizableArrayBuffer(16, 40);
+ const rab = CreateResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4);
assertEquals(0, i8a[2]);