File tree Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -184,3 +184,10 @@ Instance.register({
184184 unstable : false ,
185185 enabledByDefault : ( { isReactNativeEntryPoint } ) => isReactNativeEntryPoint ,
186186} ) ;
187+
188+ Instance . register ( {
189+ name : RNExperimentName . ENABLE_TIMELINE_FRAMES ,
190+ title : 'Enable performance frames track' ,
191+ unstable : true ,
192+ enabledByDefault : ( ) => globalThis . enableTimelineFrames ?? false ,
193+ } ) ;
Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ export const experiments = new ExperimentsSupport();
305305export enum RNExperimentName {
306306 REACT_NATIVE_SPECIFIC_UI = 'react-native-specific-ui' ,
307307 JS_HEAP_PROFILER_ENABLE = 'js-heap-profiler-enable' ,
308+ ENABLE_TIMELINE_FRAMES = 'enable-timeline-frames' ,
308309}
309310
310311export enum ConditionName {
@@ -339,6 +340,7 @@ export const enum ExperimentName {
339340 JS_HEAP_PROFILER_ENABLE = RNExperimentName . JS_HEAP_PROFILER_ENABLE ,
340341 REACT_NATIVE_SPECIFIC_UI = RNExperimentName . REACT_NATIVE_SPECIFIC_UI ,
341342 NOT_REACT_NATIVE_SPECIFIC_UI = '!' + RNExperimentName . REACT_NATIVE_SPECIFIC_UI ,
343+ ENABLE_TIMELINE_FRAMES = RNExperimentName . ENABLE_TIMELINE_FRAMES ,
342344}
343345
344346export enum GenAiEnterprisePolicyValue {
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ declare global {
1616 // eslint-disable-next-line no-var
1717 var enableDisplayingFullDisconnectedReason : boolean | undefined ;
1818 // eslint-disable-next-line no-var
19+ var enableTimelineFrames : boolean | undefined ;
20+ // eslint-disable-next-line no-var
1921 var reactNativeOpenInEditorButtonImage : string | undefined ;
2022 // eslint-disable-next-line no-var,@typescript-eslint/naming-convention
2123 var FB_ONLY__reactNativeFeedbackLink : string | undefined ;
Original file line number Diff line number Diff line change @@ -615,7 +615,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
615615 // In CPU Profiles the trace data will not have frames nor
616616 // screenshots, so we can keep this call as it will be a no-op in
617617 // these cases.
618- if ( ! this . isReactNative ) {
618+ if ( Root . Runtime . experiments . isEnabled ( Root . Runtime . RNExperimentName . ENABLE_TIMELINE_FRAMES ) || ! this . isReactNative ) {
619619 this . #appendFramesAndScreenshotsTrack( ) ;
620620 }
621621
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ const REGISTERED_EXPERIMENTS = [
130130 Root . Runtime . ExperimentName . TIMELINE_ALTERNATIVE_NAVIGATION ,
131131 Root . Runtime . ExperimentName . REACT_NATIVE_SPECIFIC_UI ,
132132 Root . Runtime . ExperimentName . NOT_REACT_NATIVE_SPECIFIC_UI ,
133+ Root . Runtime . ExperimentName . ENABLE_TIMELINE_FRAMES ,
133134] ;
134135
135136export async function initializeGlobalVars ( { reset = true } = { } ) {
You can’t perform that action at this time.
0 commit comments