Auto merge of #27505 - utsavoza:ugo/issue-24718/05-08-2020, r=jdm

Do not load srcdoc iframes synchronously

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24718
- [x] There are tests for these changes
This commit is contained in:
bors-servo 2020-08-10 16:41:59 -04:00 committed by GitHub
commit d028d71fe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 20 deletions

View file

@ -1082,9 +1082,12 @@ where
let (event_loop, host) = match sandbox {
IFrameSandboxState::IFrameSandboxed => (None, None),
IFrameSandboxState::IFrameUnsandboxed => {
// If this is an about:blank load, it must share the creator's event loop.
// This must match the logic in the script thread when determining the proper origin.
if load_data.url.as_str() != "about:blank" {
// If this is an about:blank or about:srcdoc load, it must share the creator's
// event loop. This must match the logic in the script thread when determining
// the proper origin.
if load_data.url.as_str() != "about:blank" &&
load_data.url.as_str() != "about:srcdoc"
{
match reg_host(&load_data.url) {
None => (None, None),
Some(host) => {