dom/base/crashtests/849601.html
author criss <ccozmuta@mozilla.com>
Mon, 18 Oct 2021 16:30:48 +0300
changeset 596179 ee8efced380b871deac4fba285955953a4a89ef5
parent 329664 7b434711753b98a87603453caaa0945791ffe12b
permissions -rw-r--r--
Backed out changeset 21276955f659 (bug 1720926) for causing hybrid bustages on nsIPrincipal. CLOSED TREE

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>

function addEmptyMutationObserver()
{
  var m = new MutationObserver(function () {});
  var e = document.createElement('i');
  m.observe(e, { childList: true });
}

function addPointlessMutationListener()
{
  var a = document.createElementNS("http://www.w3.org/1999/xhtml", "div");
  a.appendChild(document.createTextNode("1"));

  function f() {
    window.removeEventListener("DOMSubtreeModified", f);
    a.insertAdjacentHTML("afterBegin", "<span></span>");
  };

  window.addEventListener("DOMSubtreeModified", f);
}

function boom()
{
  addEmptyMutationObserver();
  addPointlessMutationListener();
  document.body.outerHTML = "";
}

</script>
</head>

<body onload="boom();"></body>
</html>