Title: [135335] trunk/LayoutTests
Revision
135335
Author
rn...@webkit.org
Date
2012-11-20 17:11:03 -0800 (Tue, 20 Nov 2012)

Log Message

REGRESSION(r131106): magnitude-perf.js calls bind on undefined
https://bugs.webkit.org/show_bug.cgi?id=102848

Reviewed by Tony Gentilcore.

Check the existence of performance.now before calling bind on it.

* resources/magnitude-perf.js:
(Magnitude._runIteration):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (135334 => 135335)


--- trunk/LayoutTests/ChangeLog	2012-11-21 00:45:19 UTC (rev 135334)
+++ trunk/LayoutTests/ChangeLog	2012-11-21 01:11:03 UTC (rev 135335)
@@ -1,3 +1,15 @@
+2012-11-20  Ryosuke Niwa  <rn...@webkit.org>
+
+        REGRESSION(r131106): magnitude-perf.js calls bind on undefined
+        https://bugs.webkit.org/show_bug.cgi?id=102848
+
+        Reviewed by Tony Gentilcore.
+
+        Check the existence of performance.now before calling bind on it.
+
+        * resources/magnitude-perf.js:
+        (Magnitude._runIteration):
+
 2012-11-20  David Grogan  <dgro...@chromium.org>
 
         IndexedDB: remove setVersion from pending-version-change-on-exit.html

Modified: trunk/LayoutTests/resources/magnitude-perf.js (135334 => 135335)


--- trunk/LayoutTests/resources/magnitude-perf.js	2012-11-21 00:45:19 UTC (rev 135334)
+++ trunk/LayoutTests/resources/magnitude-perf.js	2012-11-21 01:11:03 UTC (rev 135335)
@@ -201,7 +201,7 @@
     Magnitude._debug(debugStr);
 
     var iterations = 0;
-    var nowFunction = window.performance.now.bind(window.performance) || Date.now;
+    var nowFunction = window.performance && window.performance.now ? window.performance.now.bind(window.performance) : Date.now;
     var start = nowFunction();
     while (nowFunction() - start < Magnitude.millisecondsPerIteration) {
         test(magnitude);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to