Mercurial > hg > release > icedtea-web-1.4
changeset 684:032710c7ed32
Clean-up of dead & outdated parts of NetxPanel
author | Adam Domurad <adomurad@redhat.com> |
---|---|
date | Tue, 23 Apr 2013 13:27:20 -0400 |
parents | db364934ee33 |
children | b16893fb126a |
files | ChangeLog netx/net/sourceforge/jnlp/NetxPanel.java plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java |
diffstat | 3 files changed, 17 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Apr 23 12:56:13 2013 -0400 +++ b/ChangeLog Tue Apr 23 13:27:20 2013 -0400 @@ -1,3 +1,14 @@ +2013-04-23 Adam Domurad <adomurad@redhat.com> + + * netx/net/sourceforge/jnlp/NetxPanel.java + (exitOnFailure): Remove always-false field. + (NetxPanel): Remove overloaded constructor + (runLoader): Do not swallow LaunchException's. Remove dead + exitOnFailure code-path. Set applet status to APPLET_ERROR on + exception. + * plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java + (createPanel): Update call to NetxPanel constructor. + 2013-04-23 Adam Domurad <adomurad@redhat.com> * tests/reproducers/signed/AppContextHasJNLPClassLoader/resources/AppContextHasJNLPClassLoader.html:
--- a/netx/net/sourceforge/jnlp/NetxPanel.java Tue Apr 23 12:56:13 2013 -0400 +++ b/netx/net/sourceforge/jnlp/NetxPanel.java Tue Apr 23 13:27:20 2013 -0400 @@ -46,7 +46,6 @@ public class NetxPanel extends AppletViewerPanel implements SplashController { private final PluginParameters parameters; private PluginBridge bridge = null; - private boolean exitOnFailure = true; private AppletInstance appInst = null; private SplashController splashController; private boolean appletAlive; @@ -79,13 +78,6 @@ uKeyToTG.put(uniqueKey, tg); } } - } - - // overloaded constructor, called when initialized via plugin - public NetxPanel(URL documentURL, PluginParameters params, - boolean exitOnFailure) { - this(documentURL, params); - this.exitOnFailure = exitOnFailure; this.appletAlive = true; } @@ -117,28 +109,12 @@ dispatchAppletEvent(APPLET_LOADING, null); status = APPLET_LOAD; - Launcher l = new Launcher(exitOnFailure); + Launcher l = new Launcher(false); - try { - appInst = (AppletInstance) l.launch(bridge, this); - } catch (LaunchException e) { - // Assume user has indicated he does not trust the - // applet. - if (exitOnFailure) - System.exit(1); - } + // May throw LaunchException: + appInst = (AppletInstance) l.launch(bridge, this); applet = appInst.getApplet(); - //On the other hand, if you create an applet this way, it'll work - //fine. Note that you might to open visibility in sun.applet.AppletPanel - //for this to work (the loader field, and getClassLoader). - //loader = getClassLoader(getCodeBase(), getClassLoaderCacheKey()); - //applet = createApplet(loader); - - // This shows that when using NetX's JNLPClassLoader, keyboard input - // won't make it to the applet, whereas using sun.applet.AppletClassLoader - // works just fine. - if (applet != null) { // Stick it in the frame applet.setStub(this); @@ -149,12 +125,13 @@ } } catch (Exception e) { this.appletAlive = false; + status = APPLET_ERROR; e.printStackTrace(); replaceSplash(SplashUtils.getErrorSplashScreen(getWidth(), getHeight(), e)); } 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 + // Once PluginAppletViewer.AppletEventListener is signaled PluginAppletViewer can properly stop waiting // in PluginAppletViewer.waitForAppletInit dispatchAppletEvent(APPLET_LOADING_COMPLETED, null); }
--- a/plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java Tue Apr 23 12:56:13 2013 -0400 +++ b/plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java Tue Apr 23 13:27:20 2013 -0400 @@ -85,7 +85,7 @@ final PluginParameters params) { final NetxPanel panel = AccessController.doPrivileged(new PrivilegedAction<NetxPanel>() { public NetxPanel run() { - NetxPanel panel = new NetxPanel(doc, params, false); + NetxPanel panel = new NetxPanel(doc, params); NetxPanel.debug("Using NetX panel"); PluginDebug.debug(params.toString()); return panel;