Skip to content

Commit 0401dc7

Browse files
paulirishDevtools-frontend LUCI CQ
authored andcommitted
RPP: Keep dur on StubScriptCatchup events
Without dur, traceviewer/perfetto render these traces really poorly. Change-Id: I8d172ca986aa391e4298409c7edf10c69f7d4f3d Bug: none Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6852573 Auto-Submit: Paul Irish <[email protected]> Commit-Queue: Connor Clark <[email protected]> Reviewed-by: Connor Clark <[email protected]>
1 parent ffbac56 commit 0401dc7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

front_end/panels/timeline/TimelinePanel.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,13 @@ describeWithEnvironment('TimelinePanel', function() {
427427
const file = await contentDataToFile(contentData);
428428
assert.isUndefined(file.metadata.enhancedTraceVersion);
429429
assert.deepEqual(file.traceEvents, traceEvents);
430+
431+
// All `StubScriptCatchup` should have durations
432+
for (const event of file.traceEvents) {
433+
if (event.name === 'StubScriptCatchup') {
434+
assert.isDefined(event.dur);
435+
}
436+
}
430437
});
431438

432439
it('saves a CPU profile trace file', async function() {

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,6 +1356,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
13561356
cat: event.cat,
13571357
name: 'StubScriptCatchup',
13581358
ts: event.ts,
1359+
dur: event.dur,
13591360
ph: event.ph,
13601361
pid: event.pid,
13611362
tid: event.tid,

0 commit comments

Comments
 (0)