From c9a750a399153f111e70b1a42d19b7a7203eb04c Mon Sep 17 00:00:00 2001 From: serck96 Date: Sun, 21 Jan 2024 11:53:37 -0600 Subject: [PATCH] Update V8Inspector class to use jsinspector namespace --- src/v8runtime/V8Inspector.cpp | 8 ++++---- src/v8runtime/V8Inspector.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/v8runtime/V8Inspector.cpp b/src/v8runtime/V8Inspector.cpp index d936293..7a1fb13 100644 --- a/src/v8runtime/V8Inspector.cpp +++ b/src/v8runtime/V8Inspector.cpp @@ -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 weakClient) : weakClient_(weakClient) {} @@ -191,11 +191,11 @@ void InspectorClient::ConnectToReactFrontend() { std::lock_guard lock(connectionMutex_); auto weakClient = CreateWeakPtr(); - pageId_ = react::getInspectorInstance().addPage( + pageId_ = jsinspector::getInspectorInstance().addPage( inspectorName_, "V8", [weakClient = std::move(weakClient)]( - std::unique_ptr remoteConn) { + std::unique_ptr remoteConn) { auto client = weakClient.lock(); if (client) { client->remoteConn_ = std::move(remoteConn); @@ -210,7 +210,7 @@ void InspectorClient::Disconnect() { if (remoteConn_) { remoteConn_->onDisconnect(); } - react::getInspectorInstance().removePage(pageId_); + jsinspector::getInspectorInstance().removePage(pageId_); } void InspectorClient::DisconnectFromReactFrontend() { diff --git a/src/v8runtime/V8Inspector.h b/src/v8runtime/V8Inspector.h index c432771..15606f3 100644 --- a/src/v8runtime/V8Inspector.h +++ b/src/v8runtime/V8Inspector.h @@ -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 { @@ -90,7 +90,7 @@ class InspectorClient final v8::Isolate *isolate_; v8::Global context_; - std::unique_ptr remoteConn_; + std::unique_ptr remoteConn_; std::string inspectorName_; std::mutex connectionMutex_;