Fix resizable ArrayBuffer subarray tests (#3671)

This is from the normative change in
https://github.com/tc39/proposal-resizablearraybuffer/pull/93, which
got consensus in the March 2022 TC39.
This commit is contained in:
Shu-yu Guo 2022-09-19 20:45:26 -04:00 committed by GitHub
parent 9215420dee
commit 465cf4a5c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -127,7 +127,8 @@ for (let ctor of ctors) {
return 0; return 0;
} }
}; };
assert.compareArray(ToNumbers(lengthTracking.subarray(evil)), [ assert.compareArray(
ToNumbers(lengthTracking.subarray(evil, lengthTracking.length)), [
0, 0,
2, 2,
4, 4,

View File

@ -167,7 +167,7 @@ for (let ctor of ctors) {
} }
}; };
assert.throws(RangeError, () => { assert.throws(RangeError, () => {
lengthTracking.subarray(evil); lengthTracking.subarray(evil, lengthTracking.length);
}); });
} }