mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +00:00
LibJS: Preserve the original this value
As shown in the test added by this patch, it was possible to re-assign the `this` value of a member function call while it was executing. Let's copy the original this value like we already do with the callee. Fixes #2226.
This commit is contained in:
committed by
Andreas Kling
parent
f4124c7f40
commit
e53e1d3586
@@ -0,0 +1,5 @@
|
||||
test("overwriting this during function call still binds the original", () => {
|
||||
let tmp = new Map();
|
||||
// prettier-ignore
|
||||
tmp.set("", tmp = []);
|
||||
});
|
||||
Reference in New Issue
Block a user