layout/svg/crashtests/359516-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 <svg xmlns="http://www.w3.org/2000/svg" 
     2      xmlns:html="http://www.w3.org/1999/xhtml"
     3      class="reftest-wait"
     4      onload="setTimeout(doStuff, 30);">
     6 <html:script style="display: none;" type="text/javascript">
     8 function doStuff()
     9 {
    10   var svg = document.documentElement;
    11   var ellipse = document.getElementById("ellipse");
    12   var filter = document.getElementById("filter");
    14   document.addEventListener("DOMNodeRemoved", foopy, false);
    15   filter.removeChild(filter.firstChild);
    16   document.removeEventListener("DOMNodeRemoved", foopy, false);
    18   function foopy()
    19   {
    20     document.removeEventListener("DOMNodeRemoved", foopy, false);
    21     svg.appendChild(filter);
    22   }
    24   // Needed for the crash, but not for the assertion.
    25   svg.appendChild(ellipse);
    27   document.documentElement.removeAttribute("class");
    28 }
    30 </html:script>
    32 <ellipse id="ellipse" cx="200" cy="150" rx="70" ry="40" style="filter: url(#filter);"/>
    34 <filter id="filter"> </filter>
    36 </svg>

mercurial