/hg/icedtea-web: Clean-up of dead & outdated parts of NetxPanel
adomurad at icedtea.classpath.org
adomurad at icedtea.classpath.org
Tue Apr 23 10:26:19 PDT 2013
changeset 032710c7ed32 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=032710c7ed32
author: Adam Domurad <adomurad at redhat.com>
date: Tue Apr 23 13:27:20 2013 -0400
Clean-up of dead & outdated parts of NetxPanel
diffstat:
ChangeLog | 11 +++
netx/net/sourceforge/jnlp/NetxPanel.java | 33 +--------
plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java | 2 +-
3 files changed, 17 insertions(+), 29 deletions(-)
diffs (102 lines):
diff -r db364934ee33 -r 032710c7ed32 ChangeLog
--- 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 at 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 at redhat.com>
* tests/reproducers/signed/AppContextHasJNLPClassLoader/resources/AppContextHasJNLPClassLoader.html:
diff -r db364934ee33 -r 032710c7ed32 netx/net/sourceforge/jnlp/NetxPanel.java
--- 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);
}
diff -r db364934ee33 -r 032710c7ed32 plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java
--- 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;
More information about the distro-pkg-dev
mailing list