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

How do we check if an ancestor browsing context has the same URL? #25748

Open
pshaughn opened this issue Feb 12, 2020 · 1 comment
Open

How do we check if an ancestor browsing context has the same URL? #25748

pshaughn opened this issue Feb 12, 2020 · 1 comment
Labels
A-constellation Involves the constellation A-content/script Related to the script thread

Comments

@pshaughn
Copy link
Member

#3931 gave a simple case of a self-including iframe that would keep loading more of itself until running out of resources. #25668 has a fix for that simple case, but the simple fix relies on window.GetParent, and window.GetParent can only traverse same-origin browsing contexts.

If https://example1.not has an iframe src="https://example2.not" and example2 likewise embeds example1, https://html.spec.whatwg.org/multipage/iframe-embed-object.html#otherwise-steps-for-iframe-or-frame-elements step 2 tells us to stop, and the spec is phrased as though we can perform this step synchronously. Since scripts in different origins actually aren't synchronous, we can't do this just by walking through DOM elements; we need to use messages to do it, and it's conceivable that an ancestor will actually change the browsing context chain between when we start the check and when we reach that ancestor.

There was some mapping out of the problem here: #25668 (comment)

@jdm jdm added A-constellation Involves the constellation A-content/script Related to the script thread labels Feb 12, 2020
@jdm
Copy link
Member

jdm commented Feb 24, 2020

Gecko is also dealing with this right now: https://bugzilla.mozilla.org/show_bug.cgi?id=1597427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-constellation Involves the constellation A-content/script Related to the script thread
Projects
None yet
Development

No branches or pull requests

2 participants