Do not load srcdoc iframes synchronously

This commit is contained in:
Utsav Oza 2020-08-05 18:44:28 +05:30
parent 6e28d7b3ec
commit acbfd7b9ab
3 changed files with 14 additions and 8 deletions

View file

@ -1090,9 +1090,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) => {