# HG changeset patch # User Adam Domurad # Date 1362165741 18000 # Node ID cd4a9f25808e5c9ad40c83e6758a32670b78422a # Parent cd6608773628476d31fdb4e862ba13cf6126635f Fix PR1157: Applets can hang browser after fatal exception diff -r cd6608773628 -r cd4a9f25808e ChangeLog --- a/ChangeLog Mon Jan 07 11:47:37 2013 -0500 +++ b/ChangeLog Fri Mar 01 14:22:21 2013 -0500 @@ -1,3 +1,10 @@ +2013-03-01 Adam Domurad + + Fix PR1157: Applets can hang browser after fatal exception + * NEWS: Add entry for PR1157 + * netx/net/sourceforge/jnlp/NetxPanel.java + (runLoader): Move dispatchAppletEvent into a 'finally' block. + 2013-01-07 Deepak Bhole * netx/net/sourceforge/jnlp/resources/Messages.properties: Converted to diff -r cd6608773628 -r cd4a9f25808e NEWS --- a/NEWS Mon Jan 07 11:47:37 2013 -0500 +++ b/NEWS Fri Mar 01 14:22:21 2013 -0500 @@ -8,6 +8,9 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 1.2.4 (2012-XX-XX): + - PR1157: Applets can hang browser after fatal exception + New in release 1.2.3 (2012-XX-XX): * Common - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 diff -r cd6608773628 -r cd4a9f25808e netx/net/sourceforge/jnlp/NetxPanel.java --- a/netx/net/sourceforge/jnlp/NetxPanel.java Mon Jan 07 11:47:37 2013 -0500 +++ b/netx/net/sourceforge/jnlp/NetxPanel.java Fri Mar 01 14:22:21 2013 -0500 @@ -163,8 +163,6 @@ // won't make it to the applet, whereas using sun.applet.AppletClassLoader // works just fine. - dispatchAppletEvent(APPLET_LOADING_COMPLETED, null); - if (applet != null) { // Stick it in the frame applet.setStub(this); @@ -176,7 +174,13 @@ } catch (Exception e) { this.appletAlive = false; e.printStackTrace(); - } + } finally { + // PR1157: This needs to occur even in the case of an exception + // so that the applet's event listeners are signaled. + // Once PluginAppletViewer.AppletEventListener is signaled PluginAppletViewer it can properly stop waiting + // in PluginAppletViewer.waitForAppletInit + dispatchAppletEvent(APPLET_LOADING_COMPLETED, null); + } } /**