Skip to content

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented Oct 3, 2025

Summary: Changelog: [Internal]

Differential Revision: D83238216

Summary:

TSIA

Changelog: [Internal]

Differential Revision: D83825727
Summary:
Changelog: [Internal]

Adds `JsiIntegrationTest`-based tests for the C++ layer responsible for handling the CDP `Network` domain. The tests use `NetworkReporter` to mimic the behaviour of a React Native platform that is generating network events.

NOTE: There are **significant problems** with the `NetworkReporter` / `NetworkHandler` singleton design: cross-Host and cross-Instance data pollution/corruption, inability to inspect multiple Hosts at once, inconsistency between the singleton's state and the CDP session's state, etc. The singletons similarly lack any kind of mechanism for test isolation (e.g. methods for clearing state between tests). As we iteratively fix these problems, the tests will require updating.

Differential Revision: D83746505
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
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
Summary: Changelog: [Internal]

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

meta-codesync bot commented Oct 3, 2025

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

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

Successfully merging this pull request may close these issues.

2 participants