From 6e946f8c5fd09a843a76cdb24f5dc6ccbf9c36b4 Mon Sep 17 00:00:00 2001 From: Adam Domurad Date: Thu, 7 Feb 2013 14:18:24 -0500 Subject: Only destroy full initialized applets --- ChangeLog | 7 +++++++ plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6a3ea0d..e35c3f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-02-07 Adam Domurad + + Ensure applet destruction cannot in the middle of initialization. + * netx/net/sourceforge/jnlp/NetxPanel.java + (destroyApplet): wait for applet initialization + missing + 2013-02-06 Jana Fabrikova * /tests/reproducers/simple/JSToJSet/testcases/JSToJSetTest.java: diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java index ac818d5..8a4f078 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java @@ -587,6 +587,10 @@ public class PluginAppletViewer extends XEmbeddedFrame private static synchronized void destroyApplet(int identifier) { + // We should not try to destroy an applet during + // initialization. It may cause an inconsistent state. + waitForAppletInit( applets.get(identifier).panel ); + PluginDebug.debug("DestroyApplet called for ", identifier); PAV_INIT_STATUS prev = updateStatus(identifier, PAV_INIT_STATUS.DESTROYED); -- cgit v1.2.3