File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ export function handleEvent(event: Types.Events.Event): void {
5252 // INFO: Hack to correctly pair AnimationFrame nestable groupings. Since the current
5353 // local id is not correctly set.
5454 const isStartEvent = event . ph === Types . Events . Phase . ASYNC_NESTABLE_START ;
55+ const isEndEvent = event . ph === Types . Events . Phase . ASYNC_NESTABLE_END ;
56+ const isInstant = event . ph === Types . Events . Phase . ASYNC_NESTABLE_INSTANT ;
5557
5658 if ( isStartEvent && event . name === Types . Events . Name . AnimationFrame ) {
5759 currentGroupingEventSulfix = `${ event . ts } ` ;
@@ -70,7 +72,8 @@ export function handleEvent(event: Types.Events.Event): void {
7072 // INFO: Hack to correctly pair AnimationFrame nestable groupings. Since the current
7173 // Has to be unique for each event but correclty match the begining and end events to form
7274 // the pairs.
73- const currentBeginEventSulfix = ! isStartEvent ? eventSulfixes . pop ( ) : eventSulfixes . at ( - 1 ) ;
75+ let currentBeginEventSulfix = isEndEvent ? eventSulfixes . pop ( ) : eventSulfixes . at ( - 1 ) ;
76+ currentBeginEventSulfix = isInstant ? `${ event . ts } ` : currentBeginEventSulfix ;
7477 event . id2 = { local : `${ event . id2 ?. local } -${ currentGroupingEventSulfix } -${ currentBeginEventSulfix } ` } ;
7578 }
7679
Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ export interface TraceEventAnimationFrameScriptGroupingEvent extends Event {
591591 [ 'style_duration_ms' ] ?: number ,
592592 } ,
593593 } ;
594- name : Name . AnimationFrameScriptExecute ;
594+ name : Name . AnimationFrameScriptExecute | Name . AnimationFrameScriptCompile ;
595595 id2 ?: {
596596 local ?: string ,
597597 } ;
@@ -1980,7 +1980,7 @@ export function isTraceEventAnimationFrame(traceEventData: Event): traceEventDat
19801980}
19811981
19821982export function isTraceEventAnimationFrameScript ( traceEventData : Event ) : traceEventData is TraceEventAnimationFrameScriptGroupingEvent {
1983- return traceEventData . name === Name . AnimationFrameScriptExecute ;
1983+ return traceEventData . name === Name . AnimationFrameScriptCompile || traceEventData . name === Name . AnimationFrameScriptExecute ;
19841984}
19851985
19861986export function isTraceEventAnimationFramePaint ( traceEventData : Event ) : traceEventData is TraceEventAnimationFramePaintGroupingEvent {
@@ -2794,6 +2794,7 @@ export const enum Name {
27942794 AnimationFrameFirstUIEvent = 'AnimationFrame::FirstUIEvent' ,
27952795 AnimationFrameStyleAndLayout = 'AnimationFrame::StyleAndLayout' ,
27962796 AnimationFrameRender = 'AnimationFrame::Render' ,
2797+ AnimationFrameScriptCompile = 'AnimationFrame::Script::Compile' ,
27972798 AnimationFrameScriptExecute = 'AnimationFrame::Script::Execute' ,
27982799
27992800 /* Network request events */
You can’t perform that action at this time.
0 commit comments