benvanik/WebGL-Inspector — pull request #85 by samiky (2014-01-10 18:31:03+00:00)
Title: Fixed setTimer / hijackedDelay NaN delay resulting in "infinite" timeout...

Overridden window.setTimeout behaves differently, causing "infinite" timeouts.

The hijacked version assumes an "infinite" delay (in `hijackedDelay()`) of 999999999ms when the function is called with a non-numeric `delay` (like `undefined`). In common implementations the parameter is optional and a non-numeric delay defaults to `0`.

At least jQuery calls `setTimeout` like this to invoke the callback when calling `$(document).ready(callback)` after the document has already loaded. With WebGL-Inspector included `callback` will not be called.