Skip to content

Commit

Permalink
Update V8Inspector class to use jsinspector namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Serck96 committed Jan 21, 2024
1 parent 3f931e1 commit c9a750a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/v8runtime/V8Inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void InspectorFrontend::sendNotification(
client_->SendRemoteMessage(message->string());
}

class LocalConnection : public react::ILocalConnection {
class LocalConnection : public jsinspector::ILocalConnection {
public:
LocalConnection(std::weak_ptr<InspectorClient> weakClient)
: weakClient_(weakClient) {}
Expand Down Expand Up @@ -191,11 +191,11 @@ void InspectorClient::ConnectToReactFrontend() {
std::lock_guard<std::mutex> lock(connectionMutex_);

auto weakClient = CreateWeakPtr();
pageId_ = react::getInspectorInstance().addPage(
pageId_ = jsinspector::getInspectorInstance().addPage(
inspectorName_,
"V8",
[weakClient = std::move(weakClient)](
std::unique_ptr<react::IRemoteConnection> remoteConn) {
std::unique_ptr<jsinspector::IRemoteConnection> remoteConn) {
auto client = weakClient.lock();
if (client) {
client->remoteConn_ = std::move(remoteConn);
Expand All @@ -210,7 +210,7 @@ void InspectorClient::Disconnect() {
if (remoteConn_) {
remoteConn_->onDisconnect();
}
react::getInspectorInstance().removePage(pageId_);
jsinspector::getInspectorInstance().removePage(pageId_);
}

void InspectorClient::DisconnectFromReactFrontend() {
Expand Down
6 changes: 3 additions & 3 deletions src/v8runtime/V8Inspector.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include "v8-inspector.h"
#if REACT_NATIVE_TARGET_VERSION >= 73
#include "jsinspector-modern/InspectorInterfaces.h"
namespace react = facebook::react::jsinspector_modern;
namespace jsinspector = facebook::react::jsinspector_modern;
#else
#include "jsinspector/InspectorInterfaces.h"
namespace react = facebook::react;
namespace jsinspector = facebook::react;
#endif

namespace rnv8 {
Expand Down Expand Up @@ -90,7 +90,7 @@ class InspectorClient final
v8::Isolate *isolate_;
v8::Global<v8::Context> context_;

std::unique_ptr<react::IRemoteConnection> remoteConn_;
std::unique_ptr<jsinspector::IRemoteConnection> remoteConn_;
std::string inspectorName_;

std::mutex connectionMutex_;
Expand Down

0 comments on commit c9a750a

Please sign in to comment.