Skip to content

Commit 02ccc11

Browse files
hongzhidaoxeioex
authored andcommitted
QuickJS: added missed JS_NewClass() for the SharedDictError class.
1 parent f3454f0 commit 02ccc11

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

nginx/ngx_js_shared_dict.c

+11
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@ static JSClassDef ngx_qjs_shared_class = {
465465
},
466466
};
467467

468+
static JSClassDef ngx_qjs_shared_dict_error_class = {
469+
"SharedDictError",
470+
.finalizer = NULL,
471+
};
472+
468473
qjs_module_t ngx_qjs_ngx_shared_dict_module = {
469474
.name = "shared_dict",
470475
.init = ngx_qjs_ngx_shared_dict_init,
@@ -3001,6 +3006,12 @@ ngx_qjs_ngx_shared_dict_init(JSContext *cx, const char *name)
30013006
return NULL;
30023007
}
30033008

3009+
if (JS_NewClass(JS_GetRuntime(cx), NGX_QJS_CLASS_ID_SHARED_DICT_ERROR,
3010+
&ngx_qjs_shared_dict_error_class) < 0)
3011+
{
3012+
return NULL;
3013+
}
3014+
30043015
proto = JS_NewObject(cx);
30053016
if (JS_IsException(proto)) {
30063017
return NULL;

0 commit comments

Comments
 (0)