-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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(network-analyzer): more distrustful of chrome connection info #4828
Conversation
d014200
to
59359a0
Compare
lint & line length. ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (with some questions)
* @return {boolean} | ||
*/ | ||
static canTrustConnectionInformation(records) { | ||
const connectionIdWasStarted = new Map(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connectionIdWasNew
or something like that, maybe? As stand more opposite to connectionReused
} | ||
|
||
// We probably can't trust the network information if all the connection IDs were the same | ||
if (connectionIdWasStarted.size <= 1) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this happen for a single request page? (or am I missing the nature of connections? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most definitely, but in that case it won't matter since our inferred result will be identical to the real data
can you do me a favor and nuke these: lighthouse/lighthouse-extension/test/extension-test.js Lines 154 to 155 in f092a8a
|
c9abcd6
to
aae64d6
Compare
fixes https://travis-ci.org/paulirish/lighthouse/jobs/356048954#L602
huge 👏 to @paulirish for struggling through layers of docker/extension/puppeteer to get me a devtools log of this happening