js/xpconnect/crashtests/751995.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE html>
     2 <html class="reftest-wait">
     3 <head>
     4 <script>
     6 function frameDoc() { return document.getElementById("f").contentDocument; }
     8 function arm() {
     9   // Create an element in the iframe.
    10   var div = frameDoc().createElement("div");
    12   // Force a wrapper to be created for .style.
    13   var style = div.style;
    14   style.color = "green";
    16   // Adopt the element out of the iframe, leaving the |style| behind.
    17   document.adoptNode(div);
    18 }
    20 function boom()
    21 {
    22   // Create an orphan.
    23   arm();
    25   // Force an iteration over all the wrappers in frameDoc's scope, causing
    26   // us to notice the orphan.
    27   frameDoc().write("2");
    29   // All done.
    30   document.documentElement.removeAttribute("class");
    31 }
    33 </script>
    34 </head>
    35 <body onload="boom();"><iframe id="f" src="data:text/html,1"></iframe></body>
    36 </html>

mercurial