6892485: Deadlock in SunGraphicsEnvironment / FontManager

Synchronize on correct monitor in SunFontManager.

Reviewed-by: igor, prr
This commit is contained in:
Roman Kennke 2010-03-03 15:50:33 +01:00
parent 0d12029d1b
commit d500623121

View file

@ -3058,7 +3058,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
return; return;
} }
/* Use lock specific to the font system */ /* Use lock specific to the font system */
synchronized (lucidaFontName) { synchronized (this) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
Thread.dumpStack(); Thread.dumpStack();
FontUtilities.getLogger() FontUtilities.getLogger()
@ -3194,7 +3194,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
return; return;
} }
/* Use lock specific to the font system */ /* Use lock specific to the font system */
synchronized (lucidaFontName) { synchronized (this) {
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
Thread.dumpStack(); Thread.dumpStack();
FontUtilities.getLogger().info("loadAllFontFiles() called"); FontUtilities.getLogger().info("loadAllFontFiles() called");