-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Performance isolation for srcdoc
iframes (a la Origin-Agent-Cluster)
#7328
Comments
Not explicitly. The first issue is that srcdoc iframes are same-origin by default. Anything that's same-origin is impossible to performance-isolate, because the two iframes have synchronous access to each other. OK, but you can make them cross-origin by using Well, in theory, it can be. And you don't need any new header to do so; there's no synchronous access between them possible, so browsers can performance-isolate them into their own process at will. In practice, I know that Chromium at least has not implemented out-of-process iframes (OOPIFs) for Similarly, maybe @annevk has info on whether Firefox's OOPIF implementation considers sandboxed iframes able to be moved out of process. |
Thank you! So currently not possible, but it sounds like it's something we might see in the future if there's enough interest from developers and implementers. Very interested in hearing from annevk and Chromium engineers on this. Ideally it'd end up being as simple as adding a token to the |
Firefox currently doesn't do that because of concerns about memory usage. I don't think adding a token would help as attackers would set that token. We need to figure out a strategy that doesn't make it overtly expensive. One thing I discussed with @mystor is that we'd at most use 2x the amount of processes. E.g., you'd have a process for origin A, and you'd have a process for "origin" A, sandboxed (this is technically an opaque origin, but for process isolation purposes you'd keep the initial origin around). That's still not ideal of course, but it's an improvement and hopefully over time we can do more work to make processes cheaper (or wait long enough for magical hardware to be there). |
I was pointed to https://bugs.chromium.org/p/chromium/issues/detail?id=510122 on the Chrome side. |
Is there currently a way to performance-isolate a
srcdoc
iframe? The header-specified isolation approach (i.e.Origin-Agent-Cluster
) doesn't seem to support this use case.I'd like to essentially use a
srcdoc
iframe as a "rendered" webworker. So it has the performance isolation aspect of webworkers, and the ability to dynamically launch arbitrary code, and (importantly) it also has the ability render fully-interactive HTML.If the parent frame freezes for whatever reason, the child
srcdoc
frame will remain interactive, and vice versa - as is the case withOrigin-Agent-Cluster
-isolated frames.The text was updated successfully, but these errors were encountered: