diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts index 3a66e26580a..d43fba9555a 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts @@ -569,6 +569,12 @@ export class MainImpl { // would request and evaluate the Timeline panel dep tree, slowing down the UI's load. const Timeline = await import('../../panels/timeline/timeline.js'); Timeline.TimelinePanel.LoadTimelineHandler.instance().handleQueryParam(value); + } else { + const panel = Root.Runtime.Runtime.queryParam('panel'); + if (panel === 'timeline') { + // [RN] If panel is specified, we need Timeline to be ready and be subscribed to the events that will be emitted. + await import('../../panels/timeline/timeline.js'); + } } // Initialize ARIAUtils.alert Element diff --git a/front_end/panels/timeline/TimelineController.ts b/front_end/panels/timeline/TimelineController.ts index 98140d3124d..9977531ac54 100644 --- a/front_end/panels/timeline/TimelineController.ts +++ b/front_end/panels/timeline/TimelineController.ts @@ -203,12 +203,11 @@ export class TimelineController implements Trace.TracingManager.TracingManagerCl } async rnPrepareForTraceCapturedInBackground(): Promise { - await LiveMetrics.LiveMetrics.instance().disable(); - if (this.tracingManager) { this.tracingManager.rnPrepareForTraceCapturedInBackground(this); } + await LiveMetrics.LiveMetrics.instance().disable(); this.client.loadingStarted(); await this.allSourcesFinished(); await LiveMetrics.LiveMetrics.instance().enable();