Skip to content

Conversation

@motiz88
Copy link
Contributor

@motiz88 motiz88 commented Jan 29, 2026

Summary:
Changelog: [Internal]

Moves state and logic related to stashing a background trace from JReactHostInspectorTarget (JNI wrapper boilerplate, Android-specific) to HostTarget (cross-platform C++).

Managing the full lifecycle of a background trace inside HostTarget lets us remove a fair amount of API surface:

  • HostTargetDelegate::unstable_getHostTracingProfileThatWillBeEmittedOnInitialization()
  • HostTarget::hasActiveSessionWithFuseboxClient()
  • TracingAgent::emitExternalHostTracingProfile()

We also refactor some of the surrounding code and add tests (previously missing) for the behaviour of stashed background traces when there is more than one session.

Reviewed By: huntie

Differential Revision: D91589884

@meta-codesync
Copy link

meta-codesync bot commented Jan 29, 2026

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

@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 Jan 29, 2026
…ets (facebook#55314)

Summary:

TSIA - minor refactor for correctness and clarity before making changes to some of these methods up the stack.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D91140491
Summary:

Changelog: [Internal]

TSIA - minor refactor for convenience and correctness.

NOTE: When we get C++23, we can deduplicate the identical const/non-const method bodies using the nifty [deducing `this`](https://en.cppreference.com/w/cpp/language/member_functions.html#Explicit_object_member_functions) feature.

Reviewed By: hoxyq

Differential Revision: D91140490
…#55347)

Summary:

Changelog: [Internal]

Moves state and logic related to stashing a background trace from `JReactHostInspectorTarget` (JNI wrapper boilerplate, Android-specific) to `HostTarget` (cross-platform C++).

Managing the full lifecycle of a background trace inside `HostTarget` lets us remove a fair amount of API surface:
* `HostTargetDelegate::unstable_getHostTracingProfileThatWillBeEmittedOnInitialization()`
* `HostTarget::hasActiveSessionWithFuseboxClient()`
* `TracingAgent::emitExternalHostTracingProfile()`

We also refactor some of the surrounding code and add tests (previously missing) for the behaviour of stashed background traces when there is more than one session.

Reviewed By: huntie, hoxyq

Differential Revision: D91589884
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