Changeset 135335 in webkit


Ignore:
Timestamp:
Nov 20, 2012 5:11:03 PM (11 years ago)
Author:
rniwa@webkit.org
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):

Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r135333 r135335  
     12012-11-20  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION(r131106): magnitude-perf.js calls bind on undefined
     4        https://bugs.webkit.org/show_bug.cgi?id=102848
     5
     6        Reviewed by Tony Gentilcore.
     7
     8        Check the existence of performance.now before calling bind on it.
     9
     10        * resources/magnitude-perf.js:
     11        (Magnitude._runIteration):
     12
    1132012-11-20  David Grogan  <dgrogan@chromium.org>
    214
  • trunk/LayoutTests/resources/magnitude-perf.js

    r131106 r135335  
    202202
    203203    var iterations = 0;
    204     var nowFunction = window.performance.now.bind(window.performance) || Date.now;
     204    var nowFunction = window.performance && window.performance.now ? window.performance.now.bind(window.performance) : Date.now;
    205205    var start = nowFunction();
    206206    while (nowFunction() - start < Magnitude.millisecondsPerIteration) {
Note: See TracChangeset for help on using the changeset viewer.