Skip to content

Commit

Permalink
🐞 fix: Remove lock from sendNotification() and sendResponse()
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao committed Feb 27, 2024
1 parent 97eff61 commit 8bc0ae9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/jni/javet_inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ namespace Javet {
}

void JavetInspectorChannel::sendNotification(std::unique_ptr<v8_inspector::StringBuffer> 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());
Expand All @@ -165,7 +165,7 @@ namespace Javet {
}

void JavetInspectorChannel::sendResponse(int callId, std::unique_ptr<v8_inspector::StringBuffer> 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());
Expand Down

0 comments on commit 8bc0ae9

Please sign in to comment.