changeset 1918:848713f58719

PR IcedTea/436: Close all applet threads on exit 2010-05-07 Deepak Bhole <dbhole@redhat.com> PR icedtea/436: * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java (handleMessage): Don't print stack trace on InterruptedException. (appletClose): Kill misbehaving applets that don't shut down properly.
author Deepak Bhole <dbhole@redhat.com>
date Fri, 07 May 2010 16:57:27 -0400
parents f407c48f5947
children fa964a40477d
files ChangeLog plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 07 16:41:14 2010 -0400
+++ b/ChangeLog	Fri May 07 16:57:27 2010 -0400
@@ -1,3 +1,10 @@
+2010-05-07  Deepak Bhole <dbhole@redhat.com>
+
+	PR icedtea/436:
+	* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
+	(handleMessage): Don't print stack trace on InterruptedException.
+	(appletClose): Kill misbehaving applets that don't shut down properly.
+
 2010-05-07  Deepak Bhole <dbhole@redhat.com>
 
 	* rt/net/sourceforge/jnlp/Launcher.java
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Fri May 07 16:41:14 2010 -0400
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Fri May 07 16:57:27 2010 -0400
@@ -1,4 +1,4 @@
-/* VoidPluginCallRequest -- represent Java-to-JavaScript requests
+/* PluginAppletViewer -- Handles embedding of the applet panel
    Copyright (C) 2008  Red Hat 
 
 This file is part of IcedTea.
@@ -735,7 +735,7 @@
                       Thread.sleep(50);
                       wait += 50;
                   } catch (InterruptedException ie) {
-                      ie.printStackTrace();
+                      // just wait
                   }
              }
              
@@ -1605,10 +1605,15 @@
          {
              public void run()
              {
+                 ThreadGroup tg = ((JNLPClassLoader) p.applet.getClass().getClassLoader()).getApplication().getThreadGroup();
+                
                  appletShutdown(p);
                  appletPanels.removeElement(p);
                  dispose();
 
+                 if (tg.activeCount() > 0)
+                 tg.stop();
+
                  if (countApplets() == 0) {
                      appletSystemExit();
                  }