diff options
author | bptato <nincsnevem662@gmail.com> | 2023-12-09 22:26:36 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-12-09 22:26:36 +0100 |
commit | 09bab6ef85710f93850c7e8fc34f6cb13829ac8b (patch) | |
tree | b462fffcdcf99d52886a731319e7bd471592d74d /lib/quickjs/quickjs.c | |
parent | 4ee1a937fad792654277a1eedd35bd0c4f8389c6 (diff) | |
download | chawan-09bab6ef85710f93850c7e8fc34f6cb13829ac8b.tar.gz |
Revert "add_eval_variables: do not close over `this' twice"
This reverts commit 9ff482dd8d5b1b252e77712e9418b5b253f4bbf8. Importing fix from upstream instead.
Diffstat (limited to 'lib/quickjs/quickjs.c')
-rw-r--r-- | lib/quickjs/quickjs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/quickjs/quickjs.c b/lib/quickjs/quickjs.c index e6a5d2e9..ffc4977f 100644 --- a/lib/quickjs/quickjs.c +++ b/lib/quickjs/quickjs.c @@ -30216,8 +30216,7 @@ static void add_eval_variables(JSContext *ctx, JSFunctionDef *s) /* do not close top level last result */ if (vd->scope_level == 0 && vd->var_name != JS_ATOM__ret_ && - vd->var_name != JS_ATOM_NULL && - (!has_this_binding || vd->var_name != JS_ATOM_this)) { + vd->var_name != JS_ATOM_NULL) { get_closure_var(ctx, s, fd, FALSE, i, vd->var_name, FALSE, FALSE, JS_VAR_NORMAL); |