Expose a public getter on a TracingAgent for background mode (#54282)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54282

# Changelog: [Internal]

It is already in a tracing session state, we are going to use it in RuntimeTarget.

Reviewed By: huntie

Differential Revision: D85440638

fbshipit-source-id: 34e9a485b2701580f6ceef4262537a5a428dfcee
This commit is contained in:
Ruslan Lesiutin authored and meta-codesync[bot] committed 2025-11-06 04:25:36 -08:00
1 parent bc6fbfb0a8
commit f1f69462fd
2 files changed
+6 -1

No files matched your search

@@ -99,7 +99,7 @@ class RuntimeAgent final {
* Lifetime of this agent is bound to the lifetime of the Tracing session -
* HostTargetTraceRecording and to the lifetime of the RuntimeTarget.
*/
class RuntimeTracingAgent : tracing::TargetTracingAgent {
class RuntimeTracingAgent : public tracing::TargetTracingAgent {
public:
explicit RuntimeTracingAgent(tracing::TraceRecordingState &state, RuntimeTargetController &targetController);
@@ -27,6 +27,11 @@ class TargetTracingAgent {
(void)state_;
}
bool isRunningInBackgroundMode()
{
return state_.mode == tracing::Mode::Background;
}
protected:
TraceRecordingState &state_;
};