fixed js_proxy_isArray stack overflow (github issue #178)

This commit is contained in:
bellard 2023-12-01 18:15:03 +01:00
parent 6de52d878a
commit 03cc5ecc88

View file

@ -45243,6 +45243,10 @@ static int js_proxy_isArray(JSContext *ctx, JSValueConst obj)
JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY); JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY);
if (!s) if (!s)
return FALSE; return FALSE;
if (js_check_stack_overflow(ctx->rt, 0)) {
JS_ThrowStackOverflow(ctx);
return -1;
}
if (s->is_revoked) { if (s->is_revoked) {
JS_ThrowTypeErrorRevokedProxy(ctx); JS_ThrowTypeErrorRevokedProxy(ctx);
return -1; return -1;