@@ -153,12 +153,17 @@ export default class Agent extends EventEmitter<{
153153 _persistedSelection : PersistedSelection | null = null ;
154154 _persistedSelectionMatch : PathMatch | null = null ;
155155 _traceUpdatesEnabled : boolean = false ;
156- _onReloadAndProfile : ( ( recordChangeDescriptions : boolean ) => void ) | void ;
156+ _onReloadAndProfile :
157+ | ( ( recordChangeDescriptions : boolean , recordTimeline : boolean ) => void )
158+ | void ;
157159
158160 constructor (
159161 bridge : BackendBridge ,
160162 isProfiling : boolean = false ,
161- onReloadAndProfile ?: ( recordChangeDescriptions : boolean ) => void ,
163+ onReloadAndProfile ?: (
164+ recordChangeDescriptions : boolean ,
165+ recordTimeline : boolean ,
166+ ) = > void ,
162167 ) {
163168 super ( ) ;
164169
@@ -658,17 +663,19 @@ export default class Agent extends EventEmitter<{
658663 this . _bridge . send ( 'isReloadAndProfileSupportedByBackend' , true ) ;
659664 } ;
660665
661- reloadAndProfile : ( recordChangeDescriptions : boolean ) = > void =
662- recordChangeDescriptions => {
663- if ( typeof this . _onReloadAndProfile === 'function' ) {
664- this . _onReloadAndProfile ( recordChangeDescriptions ) ;
665- }
666+ reloadAndProfile : ( {
667+ recordChangeDescriptions : boolean ,
668+ recordTimeline : boolean ,
669+ } ) = > void = ( { recordChangeDescriptions, recordTimeline} ) => {
670+ if ( typeof this . _onReloadAndProfile === 'function' ) {
671+ this . _onReloadAndProfile ( recordChangeDescriptions , recordTimeline ) ;
672+ }
666673
667- // This code path should only be hit if the shell has explicitly told the Store that it supports profiling.
668- // In that case, the shell must also listen for this specific message to know when it needs to reload the app.
669- // The agent can't do this in a way that is renderer agnostic.
670- this . _bridge . send ( 'reloadAppForProfiling' ) ;
671- } ;
674+ // This code path should only be hit if the shell has explicitly told the Store that it supports profiling.
675+ // In that case, the shell must also listen for this specific message to know when it needs to reload the app.
676+ // The agent can't do this in a way that is renderer agnostic.
677+ this . _bridge . send ( 'reloadAppForProfiling' ) ;
678+ } ;
672679
673680 renamePath : RenamePathParams => void = ( {
674681 hookID,
@@ -740,17 +747,19 @@ export default class Agent extends EventEmitter<{
740747 this . removeAllListeners ( ) ;
741748 } ;
742749
743- startProfiling : ( recordChangeDescriptions : boolean ) = > void =
744- recordChangeDescriptions => {
745- this . _isProfiling = true ;
746- for ( const rendererID in this . _rendererInterfaces ) {
747- const renderer = ( ( this . _rendererInterfaces [
748- ( rendererID : any )
749- ] : any ) : RendererInterface ) ;
750- renderer . startProfiling ( recordChangeDescriptions ) ;
751- }
752- this . _bridge . send ( 'profilingStatus' , this . _isProfiling ) ;
753- } ;
750+ startProfiling : ( {
751+ recordChangeDescriptions : boolean ,
752+ recordTimeline : boolean ,
753+ } ) = > void = ( { recordChangeDescriptions, recordTimeline} ) => {
754+ this . _isProfiling = true ;
755+ for ( const rendererID in this . _rendererInterfaces ) {
756+ const renderer = ( ( this . _rendererInterfaces [
757+ ( rendererID : any )
758+ ] : any ) : RendererInterface ) ;
759+ renderer . startProfiling ( recordChangeDescriptions , recordTimeline ) ;
760+ }
761+ this . _bridge . send ( 'profilingStatus' , this . _isProfiling ) ;
762+ } ;
754763
755764 stopProfiling : ( ) = > void = ( ) => {
756765 this . _isProfiling = false ;
0 commit comments