Skip to content

Commit

Permalink
core(trace-of-tab): error when TracingStartedInPage is missing (#4164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jianzhoufeng authored and patrickhulce committed Jan 3, 2018
1 parent 7b63a66 commit ca2504e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lighthouse-core/gather/computed/trace-of-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class TraceOfTab extends ComputedArtifact {
// The first TracingStartedInPage in the trace is definitely our renderer thread of interest
// Beware: the tracingStartedInPage event can appear slightly after a navigationStart
const startedInPageEvt = keyEvents.find(e => e.name === 'TracingStartedInPage');
if (!startedInPageEvt) throw new Error('TracingStartedInPage was not found in the trace');
// Filter to just events matching the frame ID for sanity
const frameEvents = keyEvents.filter(e => e.args.frame === startedInPageEvt.args.data.page);

Expand Down

0 comments on commit ca2504e

Please sign in to comment.