<AWT Dev> RFR: 8257853: Remove dependencies on JNF's JNI utility functions in AWT and 2D code [v6]
Phil Race
prr at openjdk.java.net
Fri Dec 18 03:54:58 UTC 2020
On Fri, 18 Dec 2020 02:23:05 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8257853: Remove dependencies on JNF's JNI utility functions in AWT and 2D code
>
> src/java.desktop/macosx/native/libosxapp/JNIUtilities.h line 152:
>
>> 150: #define CHECK_EXCEPTION() \
>> 151: if ((*env)->ExceptionOccurred(env) != NULL) { \
>> 152: (*env)->ExceptionClear(env); \
>
> Why an exception is cleared here? Is it really match the behavior before the fix? I guess before the fix various JNF methods thrown the objective-c exceptions which are usually handled by the JNF_COCOA_ENTER/EXIT or in the NSApplicationAWT.runAWTLoopWithApp()
The behaviour may not be identical but it is non-identical in theoretical fatal cases.
We are actually better off here. I am seeing fewer JNI warning as a result.
Also NS exceptions per Apple should result in termination of the process.
I don't think JNF ever did the right thing.
So as I am sure you know this is only ever going to come into play if there is some JNI
error which indicates an internal error. I don't think we are any worse off here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1679
More information about the awt-dev
mailing list