JDK-8229328 : [windows] PlatformFileHandle type should be JGObject rather than void *
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u231,openjfx13
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2019-08-08
  • Updated: 2020-01-31
  • Resolved: 2019-08-09
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 Other
8u231Fixed openjfx11.0.5Fixed
Description
On Windows platform PlatformFileHandle type is considered as HANDLE (i.e void *) which is specific to Windows flavor of webkit port.
For OpenJFX, type of PlatformFileHandle should be JGObject.

Due to this failure, randomly (at times) the type of FileHandle returned from native webkit will be other than java.io.RandomAccessFile
Comments
Changeset: dde636c6219c Author: ghb Date: 2019-08-09 19:15 +0530 URL: https://hg.openjdk.java.net/openjfx/13-dev/rt/rev/dde636c6219c
09-08-2019

openjfx13 fix request is approved.
09-08-2019

openjfx13-fix-request: This fix address (a) inconsistent behaviour of PlatformFileHandle on Windows vs Mac OS X and Linux. (b) At times FileHandle returned from native context is will be other than "java.io.RandomAccessFile" which leads to un-expected behaviour.
08-08-2019

Please review the following PR https://github.com/javafxports/openjdk-jfx/pull/555 Root Cause : For windows platform "PlatformFileHandle" is considered as void * instead of JGObject. This was due to the Pre-Processor directive of "OS(WINDOWS)" preceded over PLATFORM(JAVA). Due to this the "invalidPlatformFileHandle" was futile and leading to fail of "False" case in "if" condition and FileHandle returned from Native webkit will be other than "java.io.RandomAccessFile" Solution: Make sure PlatformFileHandle is JGObject by limiting "OS(WINDOWS) && !PLATFORM(JAVA)" only for other port of webkit based on Windows OS and not on "java" port.
08-08-2019