content/canvas/crashtests/360293-1.html

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 <html>
     4 <body>
     5  Firefox: <a href="javascript:noCrash()">no crash</a> | <a href="javascript:crash()">crash</a><br/>
     6  <canvas id="foo" width="200" height="200">
     7  </canvas>
     8  <script>
     9    function d(lineWidth){
    10     var c = document.getElementById("foo").getContext("2d")
    11     c.clearRect(0,0,200,200)
    12     c.lineWidth = lineWidth
    13     c.beginPath()
    14     c.arc(100,100,80, Math.PI, 2*Math.PI, 1)
    15     c.stroke()
    16     c.beginPath()
    17     c.arc(50,50, 20, 0, 2*Math.PI, 1)
    18     c.stroke()
    19     c.beginPath()
    20     c.arc(150,50, 20, 0, 2*Math.PI, 1)
    21     c.stroke()
    22    }
    23    function noCrash() {
    24      d(Math.random()*20+5)
    25    }
    26    function crash() {
    27      d( '_' )
    28    }
    30    crash();
    31  </script>
    33 </body>
    35 </html>

mercurial