1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

LibJS: Evaluate CallExpression arguments before pushing a CallFrame

This commit is contained in:
Jack Karamanian 2020-04-01 22:28:48 -05:00 committed by Andreas Kling
parent 8f08ec5038
commit bb15b37228
2 changed files with 23 additions and 2 deletions

View file

@ -0,0 +1,17 @@
function assert(x) { if (!x) throw 1; }
try {
assert(typeof this === "object");
assert(this === global);
function Foo() {
this.x = 5;
assert(typeof this === "object");
assert(this.x === 5);
}
new Foo();
console.log("PASS");
} catch (err) {
console.log("FAIL: " + err);
}