Skip to content

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented Oct 6, 2025

Summary:
Changelog: [Internal]

D83238216 added a tryExecuteSync function for use with EnableExecutorFromThis objects - concretely, for calling functions on a weak_ptr<RuntimeTarget> from the JS thread while ensuring the RuntimeTarget is always destroyed on the inspector thread.

tryExecuteSync is a generalisation of the lambda-based delegateExecutorSync helper from RuntimeTargetConsole, so in this diff we refactor the latter to use the more general and better-documented function.

Differential Revision: D83838062

Summary:

Changelog: [Internal]

Adds a `SessionState::isNetworkDomainEnabled` bit, managed in `HostAgent`, to align with other domains. Network support is still gated behind feature flags as before.

Differential Revision: D83847357
Summary:

Changelog: [Internal]

Adds an engine-agnostic mechanism for serialising a previously captured stack trace as a CDP [`Runtime.StackTrace`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Runtime#type-StackTrace). This complements the existing `RuntimeTargetDelegate::captureStackTrace` method, which returns an opaque, engine-specific representation of a stack trace.

This can be used as a building block for implementing higher-level CDP message types like [`Network.Initiator`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator) within React Native, while keeping the underlying stack trace representation private to each engine.

Differential Revision: D83754142
…cebook#54050)

Summary:

Changelog: [Internal]

A naive approach to keeping track of request initiators inside the `NetworkHandler` singleton for CDP reporting purposes:

1. Expose a new `recordRequestInitiatorStack` method.
2. Keep the CDP-formatted stack trace (as a `folly::dynamic`) in a map keyed by request ID.
3. Destructively consume the stack trace during `onRequestWillBeSent`.

Differential Revision: D83754143
…acebook#54051)

Summary:

Adds the private, experimental `__NETWORK_REPORTER__.createDevToolsRequestId()` JavaScript method behind the Fusebox network inspection feature flag.

`createDevToolsRequestId()` returns a unique string ID for a network request, and records the current call stack as the request's [initiator](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator). If the native networking layer passes the same request ID into the C++ `NetworkReporter::reportRequestStart` method, the corresponding CDP [`requestWillBeSent`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#event-requestWillBeSent) event will contain the stack trace.

Changelog: [Internal]

Differential Revision: D83238216
Summary:
Changelog: [Internal]

D83238216 added a `tryExecuteSync` function for use with `EnableExecutorFromThis` objects - concretely, for calling functions on  a `weak_ptr<RuntimeTarget>` from the JS thread while ensuring the `RuntimeTarget` is always destroyed on the inspector thread.

`tryExecuteSync` is a generalisation of the lambda-based `delegateExecutorSync` helper from `RuntimeTargetConsole`, so in this diff we refactor the latter to use the more general and better-documented function.

Differential Revision: D83838062
@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 6, 2025
Copy link

meta-codesync bot commented Oct 6, 2025

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

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. fb-exported meta-exported p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants