Bug 701886: Always create new scope for eval().

Distinguish eval code from script code.
This commit is contained in:
Tor Andersson
2019-11-11 11:34:43 +01:00
parent d0225981aa
commit d248b0ce18
10 changed files with 42 additions and 7 deletions

View File

@@ -56,7 +56,7 @@ static void Fp_toString(js_State *J)
if (!js_iscallable(J, 0))
js_typeerror(J, "not a function");
if (self->type == JS_CFUNCTION || self->type == JS_CSCRIPT) {
if (self->type == JS_CFUNCTION || self->type == JS_CSCRIPT || self->type == JS_CEVAL) {
js_Function *F = self->u.f.function;
if (js_try(J)) {