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

Exclude artifacts from result handed to extension/devtools. #1400

Merged
merged 2 commits into from
Jan 4, 2017

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Jan 4, 2017

followup from #1163

I was getting this guy:

image

  1. Fixes the circular JSON issues when the result was handed around. The circular references are currently only in artifacts.networkRecords FWIW. All other artifacts are safe.
  2. I've also moved the stringifier in reportException to be our json-stringify-safe for good defense.
  3. Introduced a window.getLatestArtifacts for future use by devtools, and probably the viewer/perf-server (Return artifacts from runner and move assets/artifacts saving to cli #1163).

R=@brendankenny, @WeiweiAtGit

@@ -172,6 +185,7 @@ window.createReportPageAsBlob = function(results, reportContext) {
let html;
try {
html = reportGenerator.generateHTML(results, reportContext);
throw new Error('sdlfjksdf');
Copy link
Member

Choose a reason for hiding this comment

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

hmm...

@@ -30,6 +30,7 @@ const _flatten = arr => [].concat(...arr);

let lighthouseIsRunning = false;
let latestStatusLog = [];
let latestArtifacts = undefined;
Copy link
Member

Choose a reason for hiding this comment

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

whats the lifecycle for this like for devtools and the extension? Is memory eventually cleared? The artifacts can be really big

Copy link
Member Author

Choose a reason for hiding this comment

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

unknown. :)
I'll nuke it until we have an immediate need for it.

@paulirish
Copy link
Member Author

ptal

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

LGTM ✂️🔁✂️

@brendankenny brendankenny merged commit 9fc84d5 into master Jan 4, 2017
@brendankenny brendankenny deleted the filerartifacts branch January 4, 2017 22:28
andrewrota pushed a commit to andrewrota/lighthouse that referenced this pull request Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants