From 2bf91fd74748806246363b4b72c2cf6c9e8ea8ea Mon Sep 17 00:00:00 2001 From: xLuxy <67131061+xLuxy@users.noreply.github.com> Date: Sat, 30 Dec 2023 11:02:29 +0100 Subject: [PATCH] fix(client): Fix client build --- client/src/bindings/V8Natives.cpp | 4 ++-- client/src/workers/CWorker.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/bindings/V8Natives.cpp b/client/src/bindings/V8Natives.cpp index eb539bac..a2d7b888 100644 --- a/client/src/bindings/V8Natives.cpp +++ b/client/src/bindings/V8Natives.cpp @@ -92,7 +92,7 @@ inline void ShowNativeArgParseErrorMsg(V8ResourceImpl* resource, v8::LocalGetName() << ")"; - Log::Error << source.ToString() << " " << errorMsg.str() << Log::Endl; + Log::Error << source.ToString(isolate) << " " << errorMsg.str() << Log::Endl; Log::Error << "Check the documentation for the needed arguments of this native." << Log::Endl; resource->DispatchErrorEvent(errorMsg.str(), source.GetFileName(), source.GetLineNumber(), V8Helpers::GetStackTrace(errorMsg.str())); @@ -109,7 +109,7 @@ inline void ShowNativeArgMismatchErrorMsg(V8ResourceImpl* resource, alt::INative std::stringstream errorMsg; errorMsg << "Native argument size mismatch. Expected: " << expected << ", Received: " << received << " (" << native->GetName() << ")"; - Log::Error << source.ToString() << " " << errorMsg.str() << Log::Endl; + Log::Error << source.ToString(isolate) << " " << errorMsg.str() << Log::Endl; Log::Error << "Check the documentation for the needed arguments of this native." << Log::Endl; resource->DispatchErrorEvent(errorMsg.str(), source.GetFileName(), source.GetLineNumber(), V8Helpers::GetStackTrace(errorMsg.str())); diff --git a/client/src/workers/CWorker.cpp b/client/src/workers/CWorker.cpp index f5abb6d7..2c76b9db 100644 --- a/client/src/workers/CWorker.cpp +++ b/client/src/workers/CWorker.cpp @@ -135,14 +135,14 @@ void CWorker::SetupIsolate() case v8::kPromiseRejectAfterResolved: { std::ostringstream stream; - stream << location.ToString() << " Promise rejected after being resolved (" << *v8::String::Utf8Value(isolate, value->ToString(ctx).ToLocalChecked()) << ")"; + stream << location.ToString(isolate) << " Promise rejected after being resolved (" << *v8::String::Utf8Value(isolate, value->ToString(ctx).ToLocalChecked()) << ")"; worker->EmitError(stream.str()); break; } case v8::kPromiseResolveAfterResolved: { std::ostringstream stream; - stream << location.ToString() << " Promise resolved after being resolved (" << *v8::String::Utf8Value(isolate, value->ToString(ctx).ToLocalChecked()) << ")"; + stream << location.ToString(isolate) << " Promise resolved after being resolved (" << *v8::String::Utf8Value(isolate, value->ToString(ctx).ToLocalChecked()) << ")"; worker->EmitError(stream.str()); break; }