From: hongzhidao Date: Mon, 24 Mar 2025 07:40:15 +0000 (+0800) Subject: QuickJS: added missed JS_NewClass() for the SharedDictError class. X-Git-Tag: 0.8.10~12 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=02ccc1168c41014bcc267fe932afd34ce63c7f55;p=njs.git QuickJS: added missed JS_NewClass() for the SharedDictError class. --- diff --git a/nginx/ngx_js_shared_dict.c b/nginx/ngx_js_shared_dict.c index 7f8c808e..c0928088 100644 --- a/nginx/ngx_js_shared_dict.c +++ b/nginx/ngx_js_shared_dict.c @@ -465,6 +465,11 @@ static JSClassDef ngx_qjs_shared_class = { }, }; +static JSClassDef ngx_qjs_shared_dict_error_class = { + "SharedDictError", + .finalizer = NULL, +}; + qjs_module_t ngx_qjs_ngx_shared_dict_module = { .name = "shared_dict", .init = ngx_qjs_ngx_shared_dict_init, @@ -3001,6 +3006,12 @@ ngx_qjs_ngx_shared_dict_init(JSContext *cx, const char *name) return NULL; } + if (JS_NewClass(JS_GetRuntime(cx), NGX_QJS_CLASS_ID_SHARED_DICT_ERROR, + &ngx_qjs_shared_dict_error_class) < 0) + { + return NULL; + } + proto = JS_NewObject(cx); if (JS_IsException(proto)) { return NULL;