Skip to content

Commit 2eb6148

Browse files
coadofacebook-github-bot
authored andcommitted
Make select jsinspector implementation headers private
Summary: Mark the following `jsinspector-modern` headers as private instead of for-frameworks. All of them are implementation details of the inspector, and no for-frameworks header includes them: - `ConsoleTask`, `ConsoleTaskContext` and `ConsoleTaskOrchestrator` implement `console.createTask()`: the task object, the context that captures the stack trace when a task is created, and the singleton that tracks which task is currently running. They are only used by the inspector's console sources, a console test, and `PerformanceEntryReporter.cpp`, which reads the current task from the orchestrator. - `EmulationAgent` handles the CDP `Emulation` domain. It is only used by `EmulationAgent.cpp` and `HostAgent.cpp`. - `FallbackRuntimeAgentDelegate` answers CDP requests for a JavaScript runtime that does not support debugging. It is only used by `FallbackRuntimeAgentDelegate.cpp` and `FallbackRuntimeTargetDelegate.cpp`. `FallbackRuntimeTargetDelegate.h`, which creates it, stays for-frameworks. - `InspectorPackagerConnectionImpl.h` defines `InspectorPackagerConnection::Impl`, the hidden implementation of the inspector-proxy protocol. `InspectorPackagerConnection.h` only forward-declares it, and it is only used by `InspectorPackagerConnection.cpp`. `InspectorPackagerConnection.h` and `WebSocketInterfaces.h` stay for-frameworks, because each platform implements `InspectorPackagerConnectionDelegate`. - `RuntimeTargetGlobalStateObserver` installs a JavaScript global that reports a boolean state, such as whether a debugger session is active, and notifies its subscribers when the state changes. `RuntimeTargetTracingStateObserver` uses it to report whether tracing is active. Both are only used by the `RuntimeTarget` sources and their own sources. - `Utf8.h` provides `truncateToValidUTF8`, which trims a byte buffer so it does not end in the middle of a UTF-8 code point when `IO.read` slices a network resource. It is only used by `NetworkIOAgent.cpp` and its own unit test. Changelog: [Internal] Differential Revision: D123009197
1 parent be5235d commit 2eb6148

9 files changed

Lines changed: 9 additions & 9 deletions

‎packages/react-native/ReactCommon/jsinspector-modern/ConsoleTask.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include <memory>
1313

‎packages/react-native/ReactCommon/jsinspector-modern/ConsoleTaskContext.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include "StackTrace.h"
1313

‎packages/react-native/ReactCommon/jsinspector-modern/ConsoleTaskOrchestrator.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include <memory>
1313
#include <mutex>

‎packages/react-native/ReactCommon/jsinspector-modern/EmulationAgent.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include "HostTarget.h"
1313
#include "InspectorInterfaces.h"

‎packages/react-native/ReactCommon/jsinspector-modern/FallbackRuntimeAgentDelegate.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include "SessionState.h"
1313

‎packages/react-native/ReactCommon/jsinspector-modern/InspectorPackagerConnectionImpl.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include "InspectorInterfaces.h"
1313
#include "InspectorPackagerConnection.h"

‎packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetGlobalStateObserver.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include <jsi/jsi.h>
1313

‎packages/react-native/ReactCommon/jsinspector-modern/RuntimeTargetTracingStateObserver.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include <jsi/jsi.h>
1313

‎packages/react-native/ReactCommon/jsinspector-modern/Utf8.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

1212
#include <stdexcept>
1313
#include <vector>

0 commit comments

Comments
 (0)