8026356: [macosx] Found one Java-level deadlock:"AWT-EventQueue-0" && main
Reviewed-by: anthony, art
--- a/jdk/src/share/classes/java/awt/Component.java Thu Oct 17 20:54:33 2013 +0400
+++ b/jdk/src/share/classes/java/awt/Component.java Thu Oct 17 21:22:05 2013 +0400
@@ -276,7 +276,7 @@
* @see #getFont
* @see #setFont
*/
- Font font;
+ volatile Font font;
/**
* The font which the peer is currently using.
@@ -1885,10 +1885,8 @@
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();