Convert array index to integer when computing pause distribution for spinning-balls.
authorulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 31 Oct 2011 17:26:59 +0000 (17:26 +0000)
committerulan@chromium.org <ulan@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 31 Oct 2011 17:26:59 +0000 (17:26 +0000)
BUG=
TEST=

Review URL: http://codereview.chromium.org/8430006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

benchmarks/spinning-balls/v.js

index bd00973..d8a5e2a 100644 (file)
@@ -353,8 +353,8 @@ function updateStats(pause) {
   if (pause > 20) {
     sumOfSquaredPauses += (pause - 20) * (pause - 20);
   }
-  pauseDistribution[pause / 10] |= 0;
-  pauseDistribution[pause / 10]++;
+  pauseDistribution[Math.floor(pause / 10)] |= 0;
+  pauseDistribution[Math.floor(pause / 10)]++;
 }