Skip to content

Commit 34e3de0

Browse files
hoxyqfacebook-github-bot
authored andcommitted
Expose a public getter on a TracingAgent for background mode (#54282)
Summary: # Changelog: [Internal] It is already in a tracing session state, we are going to use it in RuntimeTarget. Reviewed By: huntie Differential Revision: D85440638
1 parent ca57948 commit 34e3de0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/react-native/ReactCommon/jsinspector-modern/RuntimeAgent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class RuntimeAgent final {
9999
* Lifetime of this agent is bound to the lifetime of the Tracing session -
100100
* HostTargetTraceRecording and to the lifetime of the RuntimeTarget.
101101
*/
102-
class RuntimeTracingAgent : tracing::TargetTracingAgent {
102+
class RuntimeTracingAgent : public tracing::TargetTracingAgent {
103103
public:
104104
explicit RuntimeTracingAgent(tracing::TraceRecordingState &state, RuntimeTargetController &targetController);
105105

packages/react-native/ReactCommon/jsinspector-modern/tracing/TargetTracingAgent.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class TargetTracingAgent {
2727
(void)state_;
2828
}
2929

30+
bool isRunningInBackgroundMode() {
31+
return state_.mode == tracing::Mode::Background;
32+
}
33+
3034
protected:
3135
TraceRecordingState &state_;
3236
};

0 commit comments

Comments
 (0)