@@ -487,9 +487,9 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
487487 dlib->Close ();
488488#ifdef _WIN32
489489 // Windows needs to add the filename into the error message
490- errmsg += * filename;
490+ errmsg += filename. ToStringView () ;
491491#endif // _WIN32
492- THROW_ERR_DLOPEN_FAILED (env, " %s" , errmsg. c_str () );
492+ THROW_ERR_DLOPEN_FAILED (env, " %s" , errmsg);
493493 return false ;
494494 }
495495
@@ -520,7 +520,7 @@ void DLOpen(const FunctionCallbackInfo<Value>& args) {
520520 if (mp == nullptr || mp->nm_context_register_func == nullptr ) {
521521 dlib->Close ();
522522 THROW_ERR_DLOPEN_FAILED (
523- env, " Module did not self-register: '%s'." , * filename);
523+ env, " Module did not self-register: '%s'." , filename);
524524 return false ;
525525 }
526526 }
@@ -649,7 +649,7 @@ void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
649649 exports = InitInternalBinding (realm, mod);
650650 realm->internal_bindings .insert (mod);
651651 } else {
652- return THROW_ERR_INVALID_MODULE (isolate, " No such binding: %s" , * module_v);
652+ return THROW_ERR_INVALID_MODULE (isolate, " No such binding: %s" , module_v);
653653 }
654654
655655 args.GetReturnValue ().Set (exports);
@@ -680,7 +680,7 @@ void GetLinkedBinding(const FunctionCallbackInfo<Value>& args) {
680680
681681 if (mod == nullptr ) {
682682 return THROW_ERR_INVALID_MODULE (
683- env, " No such binding was linked: %s" , * module_name_v);
683+ env, " No such binding was linked: %s" , module_name_v);
684684 }
685685
686686 Local<Object> module = Object::New (env->isolate ());
0 commit comments