http://trac.webkit.org/changeset/131106/trunk/LayoutTests/resources/magnitude-perf.js replaced var nowFunction = window.performance.now || Date.now; with var nowFunction = window.performance.now.bind(window.performance) || Date.now; Calling bind on undefined object will results in an exception being thrown and "|| Date.now" is useless.
Created attachment 175298 [details] Fixes the regression
Comment on attachment 175298 [details] Fixes the regression I don't see why we need to call bind at all. Why can't this just be: var nowFunction = window.performance.now || Date.now; The original patch that added the bind call doesn't explain this.
(In reply to comment #2) > (From update of attachment 175298 [details]) > I don't see why we need to call bind at all. Why can't this just be: > var nowFunction = window.performance.now || Date.now; > > The original patch that added the bind call doesn't explain this. You get a TypeError: Illegal invocation without it. You can test it in the console. Try storing now in a variable and then invoke that variable. I don't fully understand why. I think this answer might explain it: http://stackoverflow.com/questions/1007340/javascript-function-aliasing-doesnt-seem-to-work
It seems wrong to me that you can alias Date.now but not window.performance.now.
(In reply to comment #4) > It seems wrong to me that you can alias Date.now but not window.performance.now. performance.now() _does_ vary depending on which window you call it on. It measures the time since that window object started navigating.
oic. Sad. I wonder if we can make aliasing of these things work. Probably not. :(
Comment on attachment 175298 [details] Fixes the regression Clearing flags on attachment: 175298 Committed r135335: <http://trac.webkit.org/changeset/135335>
All reviewed patches have been landed. Closing bug.