diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 11 |
2 files changed, 16 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2012-07-18 Thomas Meyer <[email protected]> + + * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java (handleMessage): + Fix possible endless loop while waiting for the applet object instance to + get created. + 2012-07-11 Jiri Vanek <[email protected]> try to close browser before kill it diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java index 6017fa9..b901074 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java @@ -745,9 +745,18 @@ public class PluginAppletViewer extends XEmbeddedFrame long maxTimeToSleep = APPLET_TIMEOUT; panelLock.lock(); try { - while (panel == null || !panel.isAlive()) + while (panel == null || !panel.isAlive()) { maxTimeToSleep -= waitTillTimeout(panelLock, panelLive, maxTimeToSleep); + + /* we already waited till timeout, give up here directly, + * instead of waiting 180s again in below waitForAppletInit() + */ + if(maxTimeToSleep < 0) { + streamhandler.write("instance " + identifier + " reference " + -1 + " fatalError: " + "Initialization timed out"); + return; + } + } } finally { panelLock.unlock(); |