content/canvas/crashtests/553938-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     <meta http-equiv="content-type" content="text/html; charset=UTF-8">
     5     <title>ImageData Crash Test</title>
     6   </head>
     7   <body onload="crash();">
     8     <canvas id="c" width="10" height="10"></canvas>
     9     <script>
    10       function crash() {
    11         var canvas = document.getElementById('c');
    12         var ctx = canvas.getContext('2d');
    13         var imgData = {data: new Array(10*10*4), width: 10, height: 10};
    15         imgData[0] = 0;
    16         ctx.putImageData(imgData, 0, 0);
    17       }
    18     </script>
    19   </body>
    20 </html>

mercurial