mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +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:
parent
d4a6564e5a
commit
834ced9ef8
3 changed files with 3 additions and 9 deletions
|
@ -98,7 +98,7 @@
|
|||
M(NotAnObjectOfType, "Not an object of type {}") \
|
||||
M(NotAnObjectOrNull, "{} is neither an object nor null") \
|
||||
M(NotAnObjectOrString, "{} is neither an object nor a string") \
|
||||
M(NotASharedArrayBuffer, "The TypedArray's underlying buffer must be a SharedArrayBuffer") \
|
||||
M(NotASharedArrayBuffer, "The array buffer object must be a SharedArrayBuffer") \
|
||||
M(NotAString, "{} is not a string") \
|
||||
M(NotASymbol, "{} is not a symbol") \
|
||||
M(NotImplemented, "TODO({} is not implemented in LibJS)") \
|
||||
|
|
|
@ -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", () => {
|
||||
|
|
|
@ -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", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue