fixed exception handling in put_var operation (regression introduced by commit a6816be) (#454)

This commit is contained in:
Fabrice Bellard
2025-11-05 11:29:03 +01:00
parent 080c01f346
commit d10613f8f9

View File

@@ -18011,15 +18011,16 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValueConst func_obj,
} }
ret = JS_SetPropertyInternal(ctx, ctx->global_obj, cv->var_name, sp[-1], ret = JS_SetPropertyInternal(ctx, ctx->global_obj, cv->var_name, sp[-1],
ctx->global_obj, JS_PROP_THROW_STRICT); ctx->global_obj, JS_PROP_THROW_STRICT);
sp--;
if (ret < 0) if (ret < 0)
goto exception; goto exception;
} }
} else { } else {
put_var_ok: put_var_ok:
set_value(ctx, var_ref->pvalue, sp[-1]); set_value(ctx, var_ref->pvalue, sp[-1]);
}
sp--; sp--;
} }
}
BREAK; BREAK;
CASE(OP_get_loc): CASE(OP_get_loc):
{ {