@@ -10,6 +10,7 @@ import {data as auctionWorkletsData} from './AuctionWorkletsHandler.js';
1010import { data as metaHandlerData , type FrameProcessData } from './MetaHandler.js' ;
1111import { data as samplesHandlerData } from './SamplesHandler.js' ;
1212import { HandlerState , type TraceEventHandlerName } from './types.js' ;
13+ import * as Root from '../../../core/root/root.js' ;
1314
1415/**
1516 * This handler builds the hierarchy of trace events and profile calls
@@ -23,6 +24,8 @@ import {HandlerState, type TraceEventHandlerName} from './types.js';
2324 * event type.
2425 */
2526
27+ let isReactNative : boolean ;
28+
2629const processes = new Map < Types . TraceEvents . ProcessID , RendererProcess > ( ) ;
2730
2831// We track the compositor tile worker thread name events so that at the end we
@@ -80,6 +83,11 @@ export function initialize(): void {
8083 throw new Error ( 'Renderer Handler was not reset' ) ;
8184 }
8285
86+ // [RN] Used to scope down available features for React Native targets
87+ isReactNative = Root . Runtime . experiments . isEnabled (
88+ Root . Runtime . ExperimentName . REACT_NATIVE_SPECIFIC_UI ,
89+ ) ;
90+
8391 handlerState = HandlerState . INITIALIZED ;
8492}
8593
@@ -245,6 +253,11 @@ export function assignThreadName(
245253 * - Deletes processes with an unkonwn origin.
246254 */
247255export function sanitizeProcesses ( processes : Map < Types . TraceEvents . ProcessID , RendererProcess > ) : void {
256+ // See https://docs.google.com/document/d/1_mtLIHEd9bFQN4xWBSVDR357GaRo56khB1aOxgWDeu4/edit?tab=t.0 for context.
257+ if ( isReactNative ) {
258+ return ;
259+ }
260+
248261 const auctionWorklets = auctionWorkletsData ( ) . worklets ;
249262 const metaData = metaHandlerData ( ) ;
250263 if ( metaData . traceIsGeneric ) {
0 commit comments