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

Lighthouse doesn't handle OOPIFs #6337

Closed
oddui opened this issue Oct 18, 2018 · 5 comments · Fixed by #6922
Closed

Lighthouse doesn't handle OOPIFs #6337

oddui opened this issue Oct 18, 2018 · 5 comments · Fixed by #6922
Assignees
Labels

Comments

@oddui
Copy link

oddui commented Oct 18, 2018

This is a question and maybe an issue.

I was looking at chrome devtools websocket connection to chrome and noticed it does some target discovery work to get request data for iframes. The image below shows chrome devtools uses Target.sendMessageToTarget to send Network.enable to a discovered target. It then receives data in Target.receivedMessageFromTarget event.

image

I also tried to look at source code in the lighthouse/lighthouse-core/gather folder but i couldn't see it doing the target discovery thing.

Does that mean lighthouse can only see and analyse requests from the maim frame?

@patrickhulce patrickhulce changed the title Does lighthouse analyse iframe requests? Lighthouse doesn't handle OOPIFs Oct 18, 2018
@patrickhulce
Copy link
Collaborator

Great question and nice research @oddui! You are correct, Lighthouse does not handle out-of-process-iframes properly yet, but it's on our plate for this quarter.

@paulirish you mentioned dgozman was working on something to make target juggling easier, is that finished and I should get started on this?

@oddui
Copy link
Author

oddui commented Oct 19, 2018

@patrickhulce that's great to hear.

Can I ask why you specifically say out-of-process-iframes? Are there any in-process-iframes?

The reason I ask is that sometimes I do seem to get requests from iframes by just sending Network.enable to a target, using the chrome-remote-interface library. However I don't get those requests from iframes using the chrome extension debugger API. 😕

@patrickhulce
Copy link
Collaborator

patrickhulce commented Oct 19, 2018

You can read a little more about OOPIFs if you're curious, but basically cross-origin frames have been slowly moved to their own separate processes distinct from the main frame's process (site isolation). A couple of wins from this are isolating performance from misbehaving frames and security benefits to mitigate spectre-style attacks.

When the frames were all in the same process, we got all the network information just by listening to the main target/process. Now that they are separate processes we need to be listening to all the targets to get all the network information. AFAIK, we should still be getting information from frames that aren't OOP.

@paulirish
Copy link
Member

@patrickhulce i spoke with dgozman and he said it's not ready yet. Currently the Browser domain is flattened, but Page is still in progress. ~4w from now we can check in again.

Here's the implementation issue: https://bugs.chromium.org/p/chromium/issues/detail?id=775132

@paulirish
Copy link
Member

update: dgozman sez the implementation is good enough for us to use the new flattened target mgmt.

He does note the structure of service worker targets will change soon, though.

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 a pull request may close this issue.

3 participants