Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F5394215
test_apply_argument_length_limit.cjs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
625 B
Referenced Files
None
Subscribers
None
test_apply_argument_length_limit.cjs
View Options
function assert(condition, message) {
if (!condition) {
console.log("FAIL: " + message);
throw new Error(message);
}
}
const tooLong = { length: 2147483648 };
let applyThrew = false;
try {
(function () {}).apply(null, tooLong);
} catch (e) {
applyThrew = e instanceof RangeError;
}
let reflectThrew = false;
try {
Reflect.apply(function () {}, null, tooLong);
} catch (e) {
reflectThrew = e instanceof RangeError;
}
assert(applyThrew, "Function.prototype.apply should reject oversized argument lists");
assert(reflectThrew, "Reflect.apply should reject oversized argument lists");
console.log("OK");
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sun, May 17, 3:45 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
554887
Default Alt Text
test_apply_argument_length_limit.cjs (625 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment