Commit 1b0bd03b by Bryce McKinlay

EventQueue.java (invokeAndWait): Call postEvent() within synchronized block.

	* java/awt/EventQueue.java (invokeAndWait): Call postEvent() within
	synchronized block.
	* java/awt/event/InvocationEvent (dispatch): Synchronize on notifier
	before calling notifyAll().

From-SVN: r35042
parent ae0e50e8
...@@ -154,10 +154,9 @@ public class EventQueue ...@@ -154,10 +154,9 @@ public class EventQueue
InvocationEvent ie = InvocationEvent ie =
new InvocationEvent(eq, runnable, current, true); new InvocationEvent(eq, runnable, current, true);
eq.postEvent(ie);
synchronized (current) synchronized (current)
{ {
eq.postEvent(ie);
current.wait(); current.wait();
} }
......
...@@ -62,8 +62,13 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent ...@@ -62,8 +62,13 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent
runnable.run (); runnable.run ();
if (notifier != null) if (notifier != null)
{
synchronized (notifier)
{
notifier.notifyAll (); notifier.notifyAll ();
} }
}
}
public Exception getException () public Exception getException ()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment