Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(gather-runner): call clearDataForOrigin on teardown #5933

Merged
merged 3 commits into from
Sep 5, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lighthouse-core/gather/gather-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ const Driver = require('../gather/driver.js'); // eslint-disable-line no-unused-
* ii. all gatherers' afterPass()
*
* 3. Teardown
* A. GatherRunner.disposeDriver()
* B. collect all artifacts and return them
* A. clearDataForOrigin
* B. GatherRunner.disposeDriver()
* C. collect all artifacts and return them
* i. collectArtifacts() from completed passes on each gatherer
* ii. add trace data and computed artifact methods
*/
Expand Down Expand Up @@ -444,6 +445,7 @@ class GatherRunner {
firstPass = false;
}
}
await driver.clearDataForOrigin(options.requestedUrl);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like we should only do this if (!options.settings.disableStorageReset) === true like the previous call.

await GatherRunner.disposeDriver(driver);
return GatherRunner.collectArtifacts(gathererResults, baseArtifacts);
} catch (err) {
Expand Down