1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:07:35 +00:00

LibJS: Change error message for values that must be a SharedArrayBuffer

This error will be used in contexts that apply to more than TypedArrays.
This commit is contained in:
Timothy Flynn 2023-12-28 09:11:48 -05:00 committed by Andreas Kling
parent d4a6564e5a
commit 834ced9ef8
3 changed files with 3 additions and 9 deletions

View file

@ -31,10 +31,7 @@ describe("errors", () => {
expect(() => {
const typedArray = new Int32Array(4);
Atomics.wait(typedArray, 0, 0, 0);
}).toThrowWithMessage(
TypeError,
"The TypedArray's underlying buffer must be a SharedArrayBuffer"
);
}).toThrowWithMessage(TypeError, "The array buffer object must be a SharedArrayBuffer");
});
test("invalid index", () => {

View file

@ -31,10 +31,7 @@ describe("errors", () => {
expect(() => {
const typedArray = new Int32Array(4);
Atomics.waitAsync(typedArray, 0, 0, 0);
}).toThrowWithMessage(
TypeError,
"The TypedArray's underlying buffer must be a SharedArrayBuffer"
);
}).toThrowWithMessage(TypeError, "The array buffer object must be a SharedArrayBuffer");
});
test("invalid index", () => {