The Windows implementation of WorkQueue::dispatchAfter() uses CreateTimerQueueTimer(). Unfortunately, CreateTimerQueueTimer() is sloppy and can fire early. We need to compensate for this slop to ensure that the specified duration does expire before the callback function is called (or the JSC watchdog which depends on this can fail randomly).
It looks like the standard Windows timer ticks at ~64 ticks/second -> 15ms interval. http://download.microsoft.com/download/3/0/2/3027D574-C433-412A-A8B65E0A75D5B237/Timer-Resolution.docx See also https://msdn.microsoft.com/enus/library/system.timers.timer.interval(v=vs.110).aspx Another one: <https://msdn.microsoft.com/enus/library/windows/hardware/dn265247(v=vs.85).aspx>, check the "Controlling timer accuracy" section's first paragraph.
Created attachment 258932 [details] the fix.
Created attachment 258933 [details] the fix.
Comment on attachment 258933 [details] the fix. r=me.
Comment on attachment 258933 [details] the fix. Clearing flags on attachment: 258933 Committed r188415: <http://trac.webkit.org/changeset/188415>
All reviewed patches have been landed. Closing bug.