@@ -542,10 +542,8 @@ static bool on_context_module_rejected_log_exception(JSContext* cx,
542542 JS::Value* vp) {
543543 JS::CallArgs args = JS::CallArgsFromVp (argc, vp);
544544
545- JSString* id =
546- JS_GetFunctionDisplayId (JS_GetObjectFunction (&args.callee ()));
547545 gjs_debug (GJS_DEBUG_IMPORTER, " Module evaluation promise rejected: %s" ,
548- gjs_debug_string (id ).c_str ());
546+ gjs_debug_callable (&args. callee () ).c_str ());
549547
550548 JS::HandleValue error = args.get (0 );
551549
@@ -564,10 +562,8 @@ static bool on_context_module_resolved(JSContext* cx, unsigned argc,
564562 JS::Value* vp) {
565563 JS::CallArgs args = JS::CallArgsFromVp (argc, vp);
566564
567- JSString* id =
568- JS_GetFunctionDisplayId (JS_GetObjectFunction (&args.callee ()));
569565 gjs_debug (GJS_DEBUG_IMPORTER, " Module evaluation promise resolved: %s" ,
570- gjs_debug_string (id ).c_str ());
566+ gjs_debug_callable (&args. callee () ).c_str ());
571567
572568 args.rval ().setUndefined ();
573569
@@ -628,11 +624,9 @@ static void load_context_module(JSContext* cx, const char* uri,
628624 [](JSContext* cx, unsigned argc, JS::Value* vp) {
629625 JS::CallArgs args = JS::CallArgsFromVp (argc, vp);
630626
631- JSString* id =
632- JS_GetFunctionDisplayId (JS_GetObjectFunction (&args.callee ()));
633627 gjs_debug (GJS_DEBUG_IMPORTER,
634628 " Module evaluation promise rejected: %s" ,
635- gjs_debug_string (id ).c_str ());
629+ gjs_debug_callable (&args. callee () ).c_str ());
636630
637631 JS::HandleValue error = args.get (0 );
638632 // Abort because this module is required.
0 commit comments