RFR: 8242361: JavaFX Web View crashes with Segmentation Fault, when HTML contains Data-URIs [v5]

Kevin Rushforth kcr at openjdk.java.net
Wed Dec 16 18:46:03 UTC 2020


On Wed, 16 Dec 2020 18:30:13 GMT, Matthias Bläsing <github.com+2179736+matthiasblaesing at openjdk.org> wrote:

>> The code in WTF::scheduleDispatchFunctionsOnMainThread assumes, that
>> the java class com.sun.webkit.MainThread can be found be the JNI
>> function FindClass. This is only true if the class is loadable by the
>> system class loader.
>> 
>> One such case is when the OpenJFX modules are loaded from a new
>> ModuleLayer. To fix this, the reference to the class needs to be loaded
>> from when a JNI call from Java into native code is active. In that case
>> FindClass uses the classloader associated with that method.
>> 
>> The test code can be executed by running:
>> 
>> cd tests/manual/web/dataurl
>> ../../../../gradlew run
>
> Matthias Bläsing has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Ensure that the process sentinal does not keep the JVM running

tests/system/src/testapp7/java/mymod/myapp7/DataUrlWithModuleLayerLauncher.java line 44:

> 42:         new Thread() {
> 43:             {
> 44:                 setDaemon(true);

Ordinarily a good idea, but in this case it might be better without it. The only way this can matter is if there is a case where all other threads would return (thus stopping them) without any calls to `System.exit`. In that case, the earlier code would report a timeout, while the new code would exit with a normal (0) status. Not sure that's what we want.

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

PR: https://git.openjdk.java.net/jfx/pull/360


More information about the openjfx-dev mailing list