Skip to content

Commit 0bc0480

Browse files
committed
fix: Correctly initialize context in inspector client init()
I'm not sure about this, but I think the code was initializing context_ with its own initial value (i.e. nullptr), rather than the isolate's context. This seemed to trigger an error when sending a message to the frontend, which this change fixed.
1 parent 221a9c2 commit 0bc0480

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

test-app/runtime/src/main/cpp/JsV8InspectorClient.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ void JsV8InspectorClient::init() {
192192

193193
inspector_->contextCreated(v8_inspector::V8ContextInfo(context, JsV8InspectorClient::contextGroupId, v8_inspector::StringView()));
194194

195-
v8::Persistent<v8::Context> persistentContext(context->GetIsolate(), JsV8InspectorClient::PersistentToLocal(isolate_, context_));
196-
context_.Reset(isolate_, persistentContext);
195+
context_.Reset(isolate_, context);
197196

198197
this->createInspectorSession(isolate_, context);
199198
}

0 commit comments

Comments
 (0)