[go: nahoru, domu]

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(network-recorder): consider iframe responses finished #6078

Merged
merged 2 commits into from
Sep 20, 2018

Conversation

patrickhulce
Copy link
Collaborator

Summary
root requests inside frames never fire a loadingFinished devtools event, we'll use the presence of a response as the criteria for finished instead.

Related Issues/PRs
#6067

@googlebot

This comment has been minimized.

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! Great detective work.

Just some questions for my benefit (mostly so I don't have to do any work learning stuff :)

* @return {boolean}
*/
static _isFrameRootRequestAndFinished(record) {
const isFrameRootRequest = record.url === record.documentURL;
Copy link
Member
@brendankenny brendankenny Sep 20, 2018

Choose a reason for hiding this comment

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

do we have to worry about query strings or anything else throwing this check off? (are these fields ever canonicalized through different paths, I guess I'm asking)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From what I could tell this is always the full query string-included URL. There were lots of samples on the verge that had misc query string params.

*/
static _isFrameRootRequestAndFinished(record) {
const isFrameRootRequest = record.url === record.documentURL;
const responseReceived = record.responseReceivedTime > 0;
Copy link
Member

Choose a reason for hiding this comment

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

I really hate trying to remember the difference between data-received/response-received/finished/etc (as well as where things like requestServedFromCache fall into things), but just to make sure I understand, typically responseReceived only fires once, we just usually expect a loadingFinished to also be fired?

Copy link
Collaborator Author
@patrickhulce patrickhulce Sep 20, 2018

Choose a reason for hiding this comment

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

Correct that is my understanding as well, data received can fire lots of times, but we always expect response received + one of loadingFinished/loadingFailed to signal the end of the request.

Copy link
Collaborator
@wardpeet wardpeet Sep 20, 2018

Choose a reason for hiding this comment

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

do we need to consider preloads or won't this affect anything? I was thinking if a preloaded iframe was requested we might get endTime of 0. (not sure if people preload iframes) or it even counts when appending with javascript

@brendankenny
Copy link
Member

you'll need to sign the CLA 😢

@patrickhulce
Copy link
Collaborator Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@paulirish paulirish mentioned this pull request Sep 20, 2018
3 tasks
@paulirish paulirish merged commit 6483b0c into master Sep 20, 2018
@paulirish paulirish deleted the iframe_hung_network branch September 20, 2018 22:32
@paulirish
Copy link
Member

@patrickhulce i think we can revert this now with the oopif #6922 fix?

@patrickhulce
Copy link
Collaborator Author

i think we can revert this now with the oopif #6922 fix?

Put up #7517 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants