1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibJS/Tests/regress/super-length-crash.js
Luke Wilde 25e343464d LibJS: Cache length identifier for GetLengthWithThis
We cached the length identifier for GetLength, but not
GetLengthWithThis. This caused an `has_value()` verification failure
when accessing super.length. Found by Fuzzilli.
2025-04-07 14:40:48 +02:00

22 lines
345 B
JavaScript

test("does not crash when accessing super.length", () => {
let result;
class A {
constructor() {}
get length() {
return 2;
}
}
class B extends A {
constructor() {
super();
result = super.length;
}
}
new B();
expect(result).toBe(2);
});