aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletViewer.java11
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 45a1d54..03ce674 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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();