Bug 1548057 - Crashtest. r=boris
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 02 May 2019 07:32:26 +0000
changeset 531048 1f1bcf9c471dc10ef3df04c56aa4814cf34c1c1d
parent 531047 38a326f813f6b1fd1400d215730e0105f62eb9c5
child 531049 cee3233dc4f3741e294c2b3026391e0561eb3aa8
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersboris
bugs1548057
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
layout/base/crashtests/1548057.html
layout/base/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/1548057.html
@@ -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>
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -565,8 +565,9 @@ load 1511563.html
 pref(layout.css.column-span.enabled,true) load 1524382.html
 pref(layout.css.column-span.enabled,true) load 1533885.html
 pref(layout.css.column-span.enabled,true) load 1534146.html
 load 1535945.html
 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