content/base/crashtests/565125-1.html

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 <!DOCTYPE html>
     2 <html>
     3 <head>
     4 <script>
     6 function boom()
     7 {
     8   var a = document.createTextNode(" ");
     9   (document.documentElement).appendChild(a);
    10   var b = document.createElement("span");
    11   (document.documentElement).appendChild(b);
    12   var c = document.createTextNode(" ");
    13   (document.documentElement).appendChild(c);
    14   var r = document.createRange();
    15   r.setStart(a, 0); 
    16   r.setEnd(c, 0); 
    17   try {
    18     r.surroundContents(document.documentElement); 
    19   } catch(e) {
    20   }
    21   document.documentElement.appendChild(b);
    22 }
    24 </script>
    25 </head>
    26 <body onload="boom();"></body>
    27 </html>

mercurial