Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit a2f24ee

Browse files
committed
[js-api] Add missing EnforceRange to getArg argument.
All other 'unsigned long' arguments in the JS API have EnforceRange extended attributes. I assume this one was missed accidentally.
1 parent a34d5f9 commit a2f24ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

document/js-api/index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ dictionary ExceptionOptions {
12701270
[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)]
12711271
interface Exception {
12721272
constructor(Tag exceptionTag, sequence<any> payload, optional ExceptionOptions options = {});
1273-
any getArg(Tag exceptionTag, unsigned long index);
1273+
any getArg(Tag exceptionTag, [EnforceRange] unsigned long index);
12741274
boolean is(Tag exceptionTag);
12751275
readonly attribute (DOMString or undefined) stack;
12761276
};

test/js-api/exception/getArg.tentative.any.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test(() => {
4343
const tag = new WebAssembly.Tag({ parameters: [] });
4444
const exn = new WebAssembly.Exception(tag, []);
4545
for (const value of outOfRangeValues) {
46-
assert_throws_js(RangeError, () => exn.getArg(tag, value));
46+
assert_throws_js(TypeError, () => exn.getArg(tag, value));
4747
}
4848
}, "Getting out-of-range argument");
4949

0 commit comments

Comments
 (0)