mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-18 15:09:37 +00:00
8026356: [macosx] Found one Java-level deadlock:"AWT-EventQueue-0" && main
Reviewed-by: anthony, art
This commit is contained in:
parent
96c379d531
commit
44383570a1
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user