Clean backport of a safe fix for this critical deadlock bug to the jfx22 stabilization branch during RDP1.
------------- Commit messages: - Backport 90cbc66305d0a1380cf3a8cd99ad40db240e554c Changes: https://git.openjdk.org/jfx/pull/1334/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1334&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8221261 Stats: 30 lines in 1 file changed: 28 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jfx/pull/1334.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1334/head:pull/1334 PR: https://git.openjdk.org/jfx/pull/1334