6809233: Modal dialog blocks calling thread after it is hidden and disposed
Summary: Send WakingRunnable to toolkit to prevent early cleanup.
Reviewed-by: art, son
--- a/jdk/src/share/classes/java/awt/Dialog.java Mon Mar 23 09:47:39 2009 -0400
+++ b/jdk/src/share/classes/java/awt/Dialog.java Tue Mar 24 21:57:50 2009 +0100
@@ -1226,7 +1226,7 @@
synchronized (getTreeLock()) {
if (keepBlockingEDT) {
keepBlockingEDT = false;
- PeerEvent wakingEvent = new PeerEvent(this, new WakingRunnable(), PeerEvent.PRIORITY_EVENT);
+ PeerEvent wakingEvent = new PeerEvent(getToolkit(), new WakingRunnable(), PeerEvent.PRIORITY_EVENT);
AppContext curAppContext = AppContext.getAppContext();
if (showAppContext != curAppContext) {
// Wake up event dispatch thread on which the dialog was