layout/svg/crashtests/880925-1.svg

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <?xml version="1.0"?>
     3 <svg xmlns="http://www.w3.org/2000/svg">
     4 <script>
     5 <![CDATA[
     7 function boom()
     8 {
     9     var svgText = document.createElementNS("http://www.w3.org/2000/svg", "text");
    10     document.documentElement.appendChild(svgText);
    11     var text1 = document.createTextNode("A");
    12     svgText.appendChild(text1);
    13     var text2 = document.createTextNode("");
    14     svgText.appendChild(text2);
    15     document.caretPositionFromPoint(0, 0);
    16     setTimeout(function() {
    17         text2.data = "B";
    18         document.caretPositionFromPoint(0, 0);
    19     }, 0);
    20 }
    22 window.addEventListener("load", boom, false);
    24 ]]>
    25 </script>
    26 </svg>

mercurial