aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_js.c
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2025-04-07 18:28:50 -0700
committerDmitry Volyntsev <xeioexception@gmail.com>2025-04-07 22:14:16 -0700
commit113fac87c8a123d0627e82cfe3771334baa11edd (patch)
treed705b158d17c0f6caacbc9a36ce730890890b9f7 /nginx/ngx_js.c
parentf678c9048b734a6cfff36e6de9ecfe11bed266b4 (diff)
downloadnjs-113fac87c8a123d0627e82cfe3771334baa11edd.tar.gz
njs-113fac87c8a123d0627e82cfe3771334baa11edd.zip
QuickJS: ignoring rejected promises while destroying context.
Diffstat (limited to 'nginx/ngx_js.c')
-rw-r--r--nginx/ngx_js.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nginx/ngx_js.c b/nginx/ngx_js.c
index ba0fee92..316a2076 100644
--- a/nginx/ngx_js.c
+++ b/nginx/ngx_js.c
@@ -1155,6 +1155,8 @@ ngx_engine_qjs_destroy(ngx_engine_t *e, ngx_js_ctx_t *ctx,
"js unhandled rejection: %V", &exception);
}
+ JS_SetHostPromiseRejectionTracker(JS_GetRuntime(cx), NULL, NULL);
+
class_id = JS_GetClassID(ngx_qjs_arg(ctx->args[0]));
opaque = JS_GetOpaque(ngx_qjs_arg(ctx->args[0]), class_id);
opaque->external = NULL;