From 8bc0ae9e3dc8567293832caf51ddbc4c3f0a1535 Mon Sep 17 00:00:00 2001 From: Sam Cao Date: Tue, 27 Feb 2024 13:51:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Remove=20lock=20from=20se?= =?UTF-8?q?ndNotification()=20and=20sendResponse()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cpp/jni/javet_inspector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/jni/javet_inspector.cpp b/cpp/jni/javet_inspector.cpp index 6b768441c..3bb85e0a5 100644 --- a/cpp/jni/javet_inspector.cpp +++ b/cpp/jni/javet_inspector.cpp @@ -154,7 +154,7 @@ namespace Javet { } void JavetInspectorChannel::sendNotification(std::unique_ptr message) { - auto v8Locker = v8Runtime->GetUniqueV8Locker(); + // The lock is not required. V8HandleScope v8HandleScope(v8Runtime->v8Isolate); auto stdStringMessagePointer = ConvertFromStringBufferToStdStringPointer(v8Runtime->v8Isolate, message.get()); LOG_DEBUG("Sending notification: " << *stdStringMessagePointer.get()); @@ -165,7 +165,7 @@ namespace Javet { } void JavetInspectorChannel::sendResponse(int callId, std::unique_ptr message) { - auto v8Locker = v8Runtime->GetUniqueV8Locker(); + // The lock is not required. V8HandleScope v8HandleScope(v8Runtime->v8Isolate); auto stdStringMessagePointer = ConvertFromStringBufferToStdStringPointer(v8Runtime->v8Isolate, message.get()); LOG_DEBUG("Sending response: " << *stdStringMessagePointer.get());