From 2599757ff051dc5cc6b3e2c14fb4c821d4afbb35 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sat, 4 Mar 2023 18:52:55 -0800 Subject: context: Use module name in promise reaction function debug tag For debugging, make sure the module identifier is part of the promise reaction function's debug tag, so that when we break on it we can tell which module was being evaluated. --- gjs/context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gjs/context.cpp b/gjs/context.cpp index f9787017..be9049e6 100644 --- a/gjs/context.cpp +++ b/gjs/context.cpp @@ -613,7 +613,7 @@ static void load_context_module(JSContext* cx, const char* uri, GjsContextPrivate::from_cx(cx)->main_loop_release(); return false; }, - "context"); + debug_identifier); if (!ok) { gjs_log_exception(cx); @@ -1490,7 +1490,7 @@ bool GjsContextPrivate::eval_module(const char* identifier, ok = add_promise_reactions( m_cx, evaluation_promise, on_context_module_resolved, - on_context_module_rejected_log_exception, "context"); + on_context_module_rejected_log_exception, identifier); } bool exiting = false; -- cgit v1.2.1