js/xpconnect/crashtests/751995.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/xpconnect/crashtests/751995.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +<script>
     1.8 +
     1.9 +function frameDoc() { return document.getElementById("f").contentDocument; }
    1.10 +
    1.11 +function arm() {
    1.12 +  // Create an element in the iframe.
    1.13 +  var div = frameDoc().createElement("div");
    1.14 +
    1.15 +  // Force a wrapper to be created for .style.
    1.16 +  var style = div.style;
    1.17 +  style.color = "green";
    1.18 +
    1.19 +  // Adopt the element out of the iframe, leaving the |style| behind.
    1.20 +  document.adoptNode(div);
    1.21 +}
    1.22 +
    1.23 +function boom()
    1.24 +{
    1.25 +  // Create an orphan.
    1.26 +  arm();
    1.27 +
    1.28 +  // Force an iteration over all the wrappers in frameDoc's scope, causing
    1.29 +  // us to notice the orphan.
    1.30 +  frameDoc().write("2");
    1.31 +
    1.32 +  // All done.
    1.33 +  document.documentElement.removeAttribute("class");
    1.34 +}
    1.35 +
    1.36 +</script>
    1.37 +</head>
    1.38 +<body onload="boom();"><iframe id="f" src="data:text/html,1"></iframe></body>
    1.39 +</html>

mercurial