diff options
author | Deepak Bhole <[email protected]> | 2011-03-04 17:34:32 -0500 |
---|---|---|
committer | Deepak Bhole <[email protected]> | 2011-03-04 17:34:32 -0500 |
commit | 0b38becc8ddeb3026d5fa0ca89713cb3e38ac430 (patch) | |
tree | b73cf798610230ad338b43b6865766f840aa1279 /plugin | |
parent | eb116d00b1dfee2df7b1dc6191d388a4b0f4b846 (diff) |
- PR475, RH604061: Allow applets from the same page to use the same classloader
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java index 38b8b96..bd3637f 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java @@ -1646,7 +1646,14 @@ public class PluginAppletViewer extends XEmbeddedFrame { public void run() { - ThreadGroup tg = ((JNLPClassLoader) p.applet.getClass().getClassLoader()).getApplication().getThreadGroup(); + ClassLoader cl = p.applet.getClass().getClassLoader(); + + // Since we want to deal with JNLPClassLoader, extract it if this + // is a codebase loader + if (cl instanceof JNLPClassLoader.CodeBaseClassLoader) + cl = ((JNLPClassLoader.CodeBaseClassLoader) cl).getParentJNLPClassLoader(); + + ThreadGroup tg = ((JNLPClassLoader) cl).getApplication().getThreadGroup(); appletShutdown(p); appletPanels.removeElement(p); |