On Tue, 5 Nov 2024 17:57:19 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

> This PR modifies the signature of four methods -- 3 `native` JNI methods and 
> 1 Java method that is called from native code using JNI -- changing the type 
> of one of the arguments from `AccessControlContext` to `Object`.
> 
> As a follow-on to removing security manager support, we are removing all 
> references to the terminally deprecated AccessController and 
> AccessControlConext classes, which is tracked by 
> [JDK-8342993](https://bugs.openjdk.org/browse/JDK-8342993).
> 
> The Java code passes an `AccessControlContext` instance to the native 
> `JSObject` code, which stores it in the object so that it can later pass it 
> back to the `Utilities::fwkInvokeWithContext` Java method via a JNI upcall. 
> The native WebKit otherwise does not use the `AccessControlConext` object. 
> Since it is already treated as an opaque object by the native code, the 
> easiest path to eliminating the references to `AccessControlConext` is to 
> change the method signatures to pass an `Object` rather than 
> `AccessControlConext`. This has two related advantages:
> 
> 1. It will minimize the changes to native WebKit JNI code.
> 2. It will allow us to keep the native code identical between mainline jfx24 
> and earlier releases (e.g., jfx23u, jfx21u, etc), since earlier releases 
> still need to be able to run with a security manager.
> 
> This bug fix needs to go in ahead of the fix 
> for[JDK-8342993](https://bugs.openjdk.org/browse/JDK-8342993) and will be be 
> backported to all earlier code lines (whereas none of the other SM follow-up 
> fixes can be backported).
> 
> NOTE: Both this PR and PR #1620 touch the `Utilities::fwkInvokeWithContext` 
> method. I did my fix in such a way that the two PRs can go in in either order 
> with no conflicts. By doing it this way, it can be backported cleanly to 
> earlier code lines. Consequently, after both PRs are integrated, there will 
> be an unused local variable that can be removed. I will remove that as part 
> of [JDK-8342993](https://bugs.openjdk.org/browse/JDK-8342993), along with the 
> then-unneeded `SuppressWarnings` and unused `AccessController` import.

This pull request has now been integrated.

Changeset: fffa0fc4
Author:    Kevin Rushforth <k...@openjdk.org>
URL:       
https://git.openjdk.org/jfx/commit/fffa0fc4fd0f2ac332ae616066579c3b6b5a9861
Stats:     8 lines in 3 files changed: 2 ins; 1 del; 5 mod

8343630: Pass AccessControlContext to/from WebKit as opaque object

Reviewed-by: angorya, jbhaskar

-------------

PR: https://git.openjdk.org/jfx/pull/1626

Reply via email to