aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/icedteanp/java
diff options
context:
space:
mode:
authorThomas Meyer <[email protected]>2012-07-19 18:44:51 +0200
committerThomas Meyer <[email protected]>2012-07-19 18:44:51 +0200
commit098c59976e03f2eee43b907bb223ed552ef080a8 (patch)
treec50f6e45978b907fcffbbe658dc6b7e44bd9f0d6 /plugin/icedteanp/java
parentc3957858a80df0fedcce83e79cfdaec37efe9d7c (diff)
Fix possible endless loop while waiting for the applet object instance to get create get created
Diffstat (limited to 'plugin/icedteanp/java')
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletViewer.java11
1 files changed, 10 insertions, 1 deletions
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();