summaryrefslogtreecommitdiffstats
path: root/dom/canvas/crashtests/1654477.html
blob: 5303291fe241efc497f1cba5a5990d970d8a35a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html>
<head>
<script>

function boom()
{
  const canvas = document.getElementById('canvas');
  const ctx = canvas.getContext('2d');

  for (let i = 0; i < 50; i++) {
    canvas.width = 20;
    ctx.fillStyle = 'green';
    ctx.fillRect(1, 1, 20, 20);
    canvas.width = 10;
    ctx.fillStyle = 'green';
    ctx.fillRect(1, 1, 10, 10);
  }
}

</script>
</head>
<body onload="boom();">
<canvas id="canvas"></canvas>
</body>
</html>