mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
LibJS: Prevent stack overflow if Proxy handler's __proto__ is the Proxy
Fixes #9322.
This commit is contained in:
parent
9998a2c91e
commit
941ff0cf60
2 changed files with 27 additions and 0 deletions
|
@ -107,3 +107,12 @@ describe("[[Get]] invariants", () => {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
test("Proxy handler that has the Proxy itself as its prototype", () => {
|
||||
const handler = {};
|
||||
const proxy = new Proxy({}, handler);
|
||||
handler.__proto__ = proxy;
|
||||
expect(() => {
|
||||
proxy.foo;
|
||||
}).toThrowWithMessage(Error, "Call stack size limit exceeded");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue