Skip to content

Commit 2a83679

Browse files
Nancy LiDevtools-frontend LUCI CQ
authored andcommitted
[RPP Performance] Reset the parsedTrace when reset the data provider
Recording after this change: http://b/384469650#attachment61582363 Fixed: 384469650 Change-Id: I462531610ce6836c744b9a473c0dc514fee86e6f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6098009 Auto-Submit: Nancy Li <[email protected]> Commit-Queue: Andres Olivares <[email protected]> Reviewed-by: Andres Olivares <[email protected]> Commit-Queue: Nancy Li <[email protected]>
1 parent 7b3eace commit 2a83679

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

front_end/panels/timeline/TimelineFlameChartDataProvider.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ describeWithEnvironment('TimelineFlameChartDataProvider', function() {
170170
'https://unpkg.com/[email protected]/umd/react.development.js' as Platform.DevToolsPath.UrlString;
171171
// Clear the data provider cache and add the React script to the ignore list.
172172
dataProvider.reset();
173+
dataProvider.setModel(parsedTrace);
173174
ignoreListManager.ignoreListURL(SCRIPT_TO_IGNORE);
174175

175176
const eventCountAfterIgnoreList = dataProvider.timelineData().entryStartTimes.length;
@@ -179,6 +180,7 @@ describeWithEnvironment('TimelineFlameChartDataProvider', function() {
179180

180181
// Clear the data provider cache and unignore the script again
181182
dataProvider.reset();
183+
dataProvider.setModel(parsedTrace);
182184
ignoreListManager.unIgnoreListURL(SCRIPT_TO_IGNORE);
183185
// Ensure that now we have un-ignored the URL that we get the full set of events again.
184186
assert.strictEqual(dataProvider.timelineData().entryStartTimes.length, eventCountBeforeIgnoreList);

front_end/panels/timeline/TimelineFlameChartDataProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
515515
this.compatibilityTracksAppender?.reset();
516516
this.compatibilityTracksAppender = null;
517517
this.timelineDataInternal = null;
518+
this.parsedTrace = null;
518519
} else if (!resetCompatibilityTracksAppender && this.timelineDataInternal) {
519520
this.compatibilityTracksAppender?.setFlameChartDataAndEntryData(
520521
this.timelineDataInternal, this.entryData, this.entryTypeByLevel);

0 commit comments

Comments
 (0)