diff options
author | Adam Domurad <[email protected]> | 2013-04-25 10:53:44 -0400 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2013-04-25 10:53:44 -0400 |
commit | 61ca0a975341f40fbbb46379b10fbf77f0bf3d95 (patch) | |
tree | 59826404c41f9fd1060c0cf5bf284e945d09713f /netx/net/sourceforge | |
parent | 03d8ad8d96243ec9499f0b974750b6ea64f7b41f (diff) |
Fix a dead-lock bug that can cause Firefox to hang.
Diffstat (limited to 'netx/net/sourceforge')
-rw-r--r-- | netx/net/sourceforge/jnlp/NetxPanel.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/netx/net/sourceforge/jnlp/NetxPanel.java b/netx/net/sourceforge/jnlp/NetxPanel.java index b8e2388..da15d0f 100644 --- a/netx/net/sourceforge/jnlp/NetxPanel.java +++ b/netx/net/sourceforge/jnlp/NetxPanel.java @@ -39,7 +39,7 @@ import sun.awt.SunToolkit; /** * This panel calls into netx to run an applet, and pipes the display - * into a panel from gcjwebplugin. + * into a panel from the icedtea-web browser plugin. * * @author Francis Kung <[email protected]> */ @@ -48,7 +48,7 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { private PluginBridge bridge = null; private AppletInstance appInst = null; private SplashController splashController; - private boolean appletAlive; + private volatile boolean initialized; // We use this so that we can create exactly one thread group // for all panels with the same uKey. @@ -70,6 +70,7 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { super(documentURL, params.getUnderlyingHashtable()); this.parameters = params; + this.initialized = false; String uniqueKey = params.getUniqueKey(getCodeBase()); synchronized(TGMapMutex) { @@ -78,7 +79,6 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { uKeyToTG.put(uniqueKey, tg); } } - this.appletAlive = true; } @Override @@ -124,7 +124,6 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { validate(); } } catch (Exception e) { - this.appletAlive = false; status = APPLET_ERROR; e.printStackTrace(); replaceSplash(SplashUtils.getErrorSplashScreen(getWidth(), getHeight(), e)); @@ -133,6 +132,7 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { // so that the applet's event listeners are signaled. // Once PluginAppletViewer.AppletEventListener is signaled PluginAppletViewer can properly stop waiting // in PluginAppletViewer.waitForAppletInit + this.initialized = true; dispatchAppletEvent(APPLET_LOADING_COMPLETED, null); } } @@ -170,8 +170,8 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { return appInst.getClassLoader(); } - public boolean isAlive() { - return handler != null && handler.isAlive() && this.appletAlive; + public boolean isInitialized() { + return initialized; } public ThreadGroup getThreadGroup() { @@ -191,9 +191,6 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { } } - - - public void setAppletViewerFrame(SplashController framePanel) { splashController=framePanel; } |