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.

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

Commit messages:
 - Merge branch 'master' into 8343630-acc-native-webkit
 - 8343630: Pass AccessControlContext to/from WebKit as opaque object

Changes: https://git.openjdk.org/jfx/pull/1626/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1626&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8343630
  Stats: 8 lines in 3 files changed: 2 ins; 1 del; 5 mod
  Patch: https://git.openjdk.org/jfx/pull/1626.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1626/head:pull/1626

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

Reply via email to