From 303f894a70265a38d56b085382e4ec48835407ad Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Wed, 18 Feb 2026 16:59:42 -0600 Subject: [PATCH] js helpers for migrating --- source/quickjs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/quickjs.h b/source/quickjs.h index d100dcd8..98353893 100644 --- a/source/quickjs.h +++ b/source/quickjs.h @@ -587,6 +587,11 @@ JSValue __js_printf_like (2, 3) /* Log to "memory" channel + disrupt. Skips JS callback (can't allocate). */ JSValue JS_RaiseOOM (JSContext *ctx); +#define JS_ThrowOutOfMemory JS_RaiseOOM +#define JS_ThrowReferenceError JS_RaiseDisrupt +#define JS_ThrowTypeError JS_RaiseDisrupt +#define JS_ThrowInternalError JS_RaiseDisrupt +#define JS_ThrowRangeError JS_RaiseDisrupt /* ============================================================ 8. Function Creation and Invocation