aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/icedteanp/java/sun
diff options
context:
space:
mode:
authorDeepak Bhole <[email protected]>2011-05-27 17:27:55 -0400
committerDeepak Bhole <[email protected]>2011-05-27 17:27:55 -0400
commitc8d5c912afa2a741ccff538a0d753060d5aec960 (patch)
treebeda39a71a71481175b357d5d4ee2faf4857cf78 /plugin/icedteanp/java/sun
parent2a1e9cdc0b595cc4e014f089e5d20bb51a07906f (diff)
Call dispose() from swing thread when applet is closed.
Do not stop applet threadgroup on exit.
Diffstat (limited to 'plugin/icedteanp/java/sun')
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletViewer.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
index d974ca9..36bc47a 100644
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
@@ -1625,10 +1625,15 @@ public class PluginAppletViewer extends XEmbeddedFrame
appletShutdown(p);
appletPanels.removeElement(p);
- dispose();
- if (tg.activeCount() > 0)
- tg.stop();
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ dispose();
+ }
+ });
+ } catch (Exception e) { // ignore, we are just disposing it
+ }
if (countApplets() == 0) {
appletSystemExit();