From 89d93055823f5b131783f155619c486d2e752a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 6 Sep 2024 22:31:17 +0200 Subject: [PATCH] Fix DUMP_MODULE_RESOLVE flag checks Make sure to always check if the flag is enabled. --- quickjs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quickjs.c b/quickjs.c index 22285d7..d13c0b0 100644 --- a/quickjs.c +++ b/quickjs.c @@ -26835,7 +26835,9 @@ static int js_inner_module_linking(JSContext *ctx, JSModuleDef *m, } #ifdef DUMP_MODULE_RESOLVE - printf("js_inner_module_linking done\n"); + if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) { + printf("js_inner_module_linking done\n"); + } #endif return index; fail: @@ -26849,7 +26851,7 @@ static int js_link_module(JSContext *ctx, JSModuleDef *m) JSModuleDef *stack_top, *m1; #ifdef DUMP_MODULE_RESOLVE - { + if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) { char buf1[ATOM_GET_STR_BUF_SIZE]; printf("js_link_module '%s':\n", JS_AtomGetStr(ctx, buf1, sizeof(buf1), m->module_name)); } @@ -27359,7 +27361,7 @@ static int js_inner_module_evaluation(JSContext *ctx, JSModuleDef *m, } #ifdef DUMP_MODULE_RESOLVE - { + if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) { char buf1[ATOM_GET_STR_BUF_SIZE]; printf("js_inner_module_evaluation '%s':\n", JS_AtomGetStr(ctx, buf1, sizeof(buf1), m->module_name)); }