Bug 1548057 - Crashtest. r=boris

This crashes both debug and opt builds pretty badly without the fix for this
bug.

Differential Revision: https://phabricator.services.mozilla.com/D29497

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-05-02 07:32:26 +00:00
Родитель b59a99943d
Коммит aaaed5755e
2 изменённых файлов: 43 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,42 @@
<!doctype html>
<html class="reftest-wait">
<body>
<script>
let parentDoc = `
<!doctype html>
<script>
onload = function() {
let observer = new ResizeObserver(_ => {
let parentFrame = window.parent.document.querySelector("iframe");
parentFrame.getBoundingClientRect();
parentFrame.style.display = "none";
parentFrame.getBoundingClientRect();
parentFrame.srcdoc = ""; // Navigate ourselves away.
});
setTimeout(() => observer.observe(document.documentElement), 0);
}
</` + 'script>';
let iframe = document.createElement("iframe");
iframe.srcdoc = parentDoc;
iframe.onload = function() {
if (this.srcdoc !== "") // We're only interested on the second load.
return;
SpecialPowers.forceGC();
SpecialPowers.forceCC();
requestAnimationFrame(() => {
requestAnimationFrame(() => {
SpecialPowers.forceGC();
SpecialPowers.forceCC();
iframe.style.display = "";
requestAnimationFrame(() => {
requestAnimationFrame(() => {
// If we haven't crashed by now, we should be fine.
document.documentElement.className = "";
})
})
})
});
};
document.body.appendChild(iframe);
</script>

Просмотреть файл

@ -570,3 +570,4 @@ pref(layout.css.column-span.enabled,true) load 1539017.html
load 1539303.html
pref(layout.css.column-span.enabled,true) load 1541679.html
load 1547261.html
pref(layout.css.resizeobserver.enabled,true) load 1548057.html