JDK-8342993 : Remove uses of AccessController and AccessControlContext from JavaFX
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: jfx24
  • Priority: P3
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2024-10-24
  • Updated: 2024-11-15
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.
Other
jfx24Unresolved
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Description
JDK-8342441 is tracking the removal of calls to AccessController.doPrivileged. This bug tracks removal of the remaining uses of AccessController and AccessControlContext.

Excluding AccessController.doPrivileged, there are 255 occurrences in 90 files, although several of these are associated with doPrivileged calls and will be eliminated along with the removal of doPrivileged, so this should be rechecked after JDK-8342441 is done.

Also, double check:
- unused imports
- unnecessary `@SuppressWarning`s
- remove FXPermissions class
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1638 Date: 2024-11-14 20:59:16 +0000
14-11-2024

During the review of JDK-8343630 a suggestion was made to add a comment as to why the dummy accessControlContext parameter is still there, so I will add such a comment when removing the references to `AccessControlContext` class. See https://github.com/openjdk/jfx/pull/1626#issuecomment-2459595005
06-11-2024

I have split out the changes that impact the native WebKit code to JDK-8343630. That fix will be integrated ahead of this one.
05-11-2024

There is one minor complication to be aware of: The Java code in WebView passes an AccessControlContext object to the native JNI code in a few places, which stores the ACC to be later used in an upcall. In order to eliminate all occurrences of ACC, which I want to do, I'll need to change the native code signatures for a few JNI functions, which means I'll end up needing to build WebKit every time I want to test it. These native files are included in the attached files, "grep-accesscontrol.log" and "accesscontrol-files.txt".
24-10-2024