Skip to content

Commit cfd592a

Browse files
jackfranklinDevtools-frontend LUCI CQ
authored andcommitted
Trace: don't identify Layout events just on name.
Because a `performance.measure('Layout')` would incorrectly be identified, otherwise. This is also the case for loads of events, but "Layout" is one that very likely could be used by an end user for custom timings. [email protected] Bug: 434109012 Change-Id: Ic96eb2edc79e45d4f4ca9c2682c44aba6749a94f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6811270 Commit-Queue: Paul Irish <[email protected]> Commit-Queue: Jack Franklin <[email protected]> Auto-Submit: Jack Franklin <[email protected]> Reviewed-by: Paul Irish <[email protected]>
1 parent c0f6211 commit cfd592a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

front_end/models/trace/types/TraceEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@ export interface Layout extends Complete {
19661966
};
19671967
}
19681968
export function isLayout(event: Event): event is Layout {
1969-
return event.name === Name.LAYOUT;
1969+
return event.name === Name.LAYOUT && Boolean(event.args && 'beginData' in event.args);
19701970
}
19711971
export interface InvalidateLayout extends Instant {
19721972
name: Name.INVALIDATE_LAYOUT;

0 commit comments

Comments
 (0)