JDK-8161258 : [Win] Timer functionality is broken after JDK-8089563
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u112,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-07-13
  • Updated: 2016-08-11
  • Resolved: 2016-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u112Fixed 9 b131Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Timer fires too quickly in windows after JDK-8089563 bug fix.

Test cases:

1. https://jsfiddle.net/ararunprasad/dc1abfx2/
2. Try loading google.com and see the cursor blink, it is too quick.

Comments
changeset: 044134068417 user: arajkumar date: Wed Jul 13 18:41:15 2016 +0530 Reviewed-by: ghb, asrivatsava, mbilla URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/044134068417
13-07-2016

+1 Tested with HelloHTMLEditor.java, cusrsor blinks correctly.
13-07-2016

+1
13-07-2016

http://cr.openjdk.java.net/~arajkumar/8161258/webrev.00
13-07-2016

Our monotonically increasing time implementation for windows is based on glib's g_get_monotonic_time[1] function which returns time in microseconds. So the windows implementation of g_get_monotonic_time multiplies the ticks in millisecond by 1000 to convert to microseconds. But WTF::monotonicallyIncreasingTime() needs in seconds, so we need to divide by 1000 as like below. --- a/modules/web/src/main/native/Source/WTF/wtf/CurrentTime.cpp Fri Jul 08 09:29:37 2016 +1200 +++ b/modules/web/src/main/native/Source/WTF/wtf/CurrentTime.cpp Wed Jul 13 08:01:25 2016 +0100 @@ -321,7 +321,7 @@ ticks -= ticksAs32Bit - ticks32; } - return ticks * 1000; + return ticks / 1000.0; } #elif PLATFORM(JAVA) && OS(LINUX) [1] https://github.com/GNOME/glib/blob/8d023c2706c1aca43dd04e807dd7d78aee96f202/glib/gmain.c
13-07-2016

Good Catch... Tested google and bing.. +1
13-07-2016