From bb2d2a365333547e4bcf0d39b06928e31d5b60d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Isager=20Dalsgar=C3=B0?= Date: Sat, 7 Mar 2026 12:03:07 +0100 Subject: [PATCH] Initialize `current_exception` to `JS_UNINITIALIZED` --- mquickjs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mquickjs.c b/mquickjs.c index a950f3c..80dc3e1 100644 --- a/mquickjs.c +++ b/mquickjs.c @@ -2117,7 +2117,7 @@ JSValue JS_GetException(JSContext *ctx) { JSValue obj; obj = ctx->current_exception; - ctx->current_exception = JS_UNDEFINED; + ctx->current_exception = JS_UNINITIALIZED; return obj; } @@ -3610,7 +3610,7 @@ JSContext *JS_NewContext2(void *mem_start, size_t mem_size, const JSSTDLibraryDe } - ctx->current_exception = JS_UNDEFINED; + ctx->current_exception = JS_UNINITIALIZED; #ifdef DEBUG_GC /* set the dummy block at the start of the memory */ { @@ -5583,7 +5583,7 @@ JSValue JS_Call(JSContext *ctx, int call_flags) /* exception caught by a 'catch' in the current function */ *--sp = ctx->current_exception; - ctx->current_exception = JS_NULL; + ctx->current_exception = JS_UNINITIALIZED; byte_code = JS_VALUE_TO_PTR(b->byte_code); pc = byte_code->buf + JS_VALUE_GET_SPECIAL_VALUE(val2); goto restart;