script: Properly handle removed iframes in GlobalScope::get_referrer (#32782)

Signed-off-by: newmoneybigbucks <newmoneybigbucks@protonmail.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
newmoneybigbucks 2024-08-07 07:12:19 -04:00 committed by GitHub
parent 9cb0e74cdc
commit 3fca6e015f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 8 deletions

View file

@ -6896,6 +6896,13 @@
null,
{}
]
],
"srcdoc-removed-iframe-crash.html": [
"ebf4e1330a772ecffb5500d493c3225cae018d79",
[
null,
{}
]
]
},
"the-img-element": {

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<body>
<title>iframe with srcdoc content that loads after iframe is removed from the document</title>
<link rel="author" title="Martin Robinson" href="mrobinson@igalia.com">
<link rel="help" href="https://github.com/servo/servo/issues/32432">
<iframe srcdoc="contents"></iframe>
<script>
document.querySelector('iframe').remove();
</script>
</body>
</html>