Skip to content

Make select jsinspector implementation headers private (#58943) - #58943

Open
coado wants to merge 2 commits into
react:mainfrom
coado:export-D123009197
Open

coado wants to merge 2 commits into
react:mainfrom
coado:export-D123009197

Conversation

@coado

@coado coado commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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.
  • ExecutionContextManager allocates execution context IDs. It is only created by HostTarget.cpp and used by InstanceTarget.cpp. HostTarget.h and InstanceTarget.h only hold it through std::shared_ptr, so they now forward-declare it instead of including the header, and the two sources include it directly.

React Native's own targets define RN_BUILDING, so the private guard does not affect them.

Changelog: [Internal]

Differential Revision: D123009197

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 8, 2026
@facebook-github-tools facebook-github-tools Bot added p: Software Mansion Partner: Software Mansion Partner p: Facebook Partner: Facebook labels Oct 8, 2026
@meta-codesync

meta-codesync Bot commented Oct 8, 2026

Copy link
Copy Markdown

@coado has exported this pull request. If you are a Meta employee, you can view the originating Diff in D123009197.

coado added 2 commits October 8, 2026 08:04
…#58919)

Summary:

Lower the following `react/renderer/components/textinput` headers from "for frameworks" to private:

Platform component descriptors:
- Android `androidtextinput/AndroidTextInputComponentDescriptor.h`
- iOS and macOS `iostextinput/TextInputComponentDescriptor.h`

All three classes are `final`, so they cannot be extended, and they are registered only by React Native's own platform glue (the Android core components registry and the iOS TextInput component view). The Android descriptor is additionally coupled to React Native's Java `FabricUIManager` (it reads theme padding over JNI in `getInitialState`).

Prop conversion helpers:
- `baseConversions.h` (conversions for the shared text input enums)
- iOS and macOS `iostextinput/propsConversions.h` (iOS/macOS text input trait parsers)

These are only included by the module's own props sources (`BaseTextInputProps.cpp` and the platform `TextInputProps.cpp` / `AndroidTextInputProps.cpp`).


Changelog: [Internal]

Differential Revision: D123643375
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.
- `ExecutionContextManager` allocates execution context IDs. It is only created by `HostTarget.cpp` and used by `InstanceTarget.cpp`. `HostTarget.h` and `InstanceTarget.h` only hold it through `std::shared_ptr`, so they now forward-declare it instead of including the header, and the two sources include it directly.

React Native's own targets define `RN_BUILDING`, so the private guard does not affect them.

Changelog: [Internal]

Differential Revision: D123009197
@meta-codesync meta-codesync Bot changed the title Make select jsinspector implementation headers private Make select jsinspector implementation headers private (#58943) Oct 8, 2026
@coado
coado force-pushed the export-D123009197 branch from 3ed1467 to aac583b Compare October 8, 2026 15:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant