8026356: [macosx] Found one Java-level deadlock:"AWT-EventQueue-0" && main

Reviewed-by: anthony, art
This commit is contained in:
Sergey Bylokhov 2013-10-17 21:22:05 +04:00
parent 96c379d531
commit 44383570a1

View File

@ -276,7 +276,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #getFont
* @see #setFont
*/
Font font;
volatile Font font;
/**
* The font which the peer is currently using.
@ -1885,10 +1885,8 @@ public abstract class Component implements ImageObserver, MenuContainer,
public void setFont(Font f) {
Font oldFont, newFont;
synchronized(getTreeLock()) {
synchronized (this) {
oldFont = font;
newFont = font = f;
}
oldFont = font;
newFont = font = f;
ComponentPeer peer = this.peer;
if (peer != null) {
f = getFont();