/hg/icedtea6: Fix IcedTea Bug# 406: Handle pages with nested obj...
dbhole at icedtea.classpath.org
dbhole at icedtea.classpath.org
Tue Dec 1 08:18:19 PST 2009
changeset d9377bd6e521 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d9377bd6e521
author: Deepak Bhole <dbhole at redhat.com>
date: Fri Nov 27 11:17:31 2009 -0500
Fix IcedTea Bug# 406: Handle pages with nested object tags (with
latter being for IE)
diffstat:
4 files changed, 38 insertions(+), 12 deletions(-)
ChangeLog | 10 +++
plugin/icedtea/sun/applet/PluginAppletViewer.java | 36 +++++++++-----
rt/net/sourceforge/jnlp/Launcher.java | 2
rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java | 2
diffs (129 lines):
diff -r 610a316e54d2 -r d9377bd6e521 ChangeLog
--- a/ChangeLog Wed Nov 25 11:41:02 2009 +0000
+++ b/ChangeLog Fri Nov 27 11:17:31 2009 -0500
@@ -1,3 +1,13 @@ 2009-11-25 Gary Benson <gbenson at redhat
+2009-11-27 Deepak Bhole <dbhole at redhat.com>
+
+ * plugin/icedtea/sun/applet/PluginAppletViewer.java
+ (getWindow): Fortify condition for wait for panel initialization.
+ (parse): Handle nested objected tags, don't allow parameter value
+ overwrite.
+ * rt/net/sourceforge/jnlp/Launcher.java
+ (createApplet): Set context classloader for the thread to the applet's
+ classloader, so that getContextClassLoader calls succeed.
+
2009-11-25 Gary Benson <gbenson at redhat.com>
* ports/hotspot/src/cpu/zero/vm/entry_zero.hpp
diff -r 610a316e54d2 -r d9377bd6e521 plugin/icedtea/sun/applet/PluginAppletViewer.java
--- a/plugin/icedtea/sun/applet/PluginAppletViewer.java Wed Nov 25 11:41:02 2009 +0000
+++ b/plugin/icedtea/sun/applet/PluginAppletViewer.java Fri Nov 27 11:17:31 2009 -0500
@@ -898,8 +898,8 @@ import com.sun.jndi.toolkit.url.UrlUtil;
try {
PluginDebug.debug ("wait request 1");
synchronized(request) {
- PluginDebug.debug ("wait request 2");
- while ((Long) request.getObject() == 0)
+ PluginDebug.debug ("wait request 2 " + status.get(identifier) );
+ while ((Long) request.getObject() == 0 && (status.get(identifier).equals(PAV_INIT_STATUS.ACTIVE) || status.get(identifier).equals(PAV_INIT_STATUS.PRE_INIT)))
request.wait();
PluginDebug.debug ("wait request 3");
}
@@ -1677,6 +1677,7 @@ import com.sun.jndi.toolkit.url.UrlUtil;
boolean isAppletTag = false;
boolean isObjectTag = false;
boolean isEmbedTag = false;
+ boolean objectTagAlreadyParsed = false;
// warning messages
String requiresNameWarning = amh.getMessage("parse.warning.requiresname");
@@ -1751,6 +1752,10 @@ import com.sun.jndi.toolkit.url.UrlUtil;
if (nm.equalsIgnoreCase("param")) {
Hashtable t = scanTag(in);
String att = (String)t.get("name");
+
+ if (atts.containsKey(att))
+ continue;
+
if (att == null) {
statusMsgStream.println(requiresNameWarning);
} else {
@@ -1783,7 +1788,7 @@ import com.sun.jndi.toolkit.url.UrlUtil;
atts = scanTag(in);
// If there is a classid and no code tag present, transform it to code tag
- if (atts.get("code") == null && atts.get("classid") != null) {
+ if (atts.get("code") == null && atts.get("classid") != null && ((String) atts.get("classid")).endsWith(".class")) {
atts.put("code", atts.get("classid"));
}
@@ -1817,13 +1822,18 @@ import com.sun.jndi.toolkit.url.UrlUtil;
}
else if (nm.equalsIgnoreCase("object")) {
isObjectTag = true;
- atts = scanTag(in);
-
- // If there is a classid and no code tag present, transform it to code tag
- if (atts.get("code") == null && atts.get("classid") != null) {
- atts.put("code", atts.get("classid"));
- }
-
+
+ // Once code is set, additional nested objects are ignored
+ if (!objectTagAlreadyParsed) {
+ objectTagAlreadyParsed = true;
+ atts = scanTag(in);
+ }
+
+ // If there is a classid and no code tag present, transform it to code tag
+ if (atts.get("code") == null && atts.get("classid") != null && ((String) atts.get("classid")).endsWith(".class")) {
+ atts.put("code", atts.get("classid"));
+ }
+
// remove java: from code tag
if (atts.get("code") != null && ((String) atts.get("code")).startsWith("java:")) {
atts.put("code", ((String) atts.get("code")).substring(5));
@@ -1833,6 +1843,10 @@ import com.sun.jndi.toolkit.url.UrlUtil;
// http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html#in-ie
if (atts.get("java_code") != null) {
atts.put("code", ((String) atts.get("java_code")));
+ }
+
+ if (atts.containsKey("code")) {
+ objectTagAlreadyParsed = true;
}
if (atts.get("java_codebase") != null) {
@@ -1874,7 +1888,7 @@ import com.sun.jndi.toolkit.url.UrlUtil;
atts = scanTag(in);
// If there is a classid and no code tag present, transform it to code tag
- if (atts.get("code") == null && atts.get("classid") != null) {
+ if (atts.get("code") == null && atts.get("classid") != null && ((String) atts.get("classid")).endsWith(".class")) {
atts.put("code", atts.get("classid"));
}
diff -r 610a316e54d2 -r d9377bd6e521 rt/net/sourceforge/jnlp/Launcher.java
--- a/rt/net/sourceforge/jnlp/Launcher.java Wed Nov 25 11:41:02 2009 +0000
+++ b/rt/net/sourceforge/jnlp/Launcher.java Fri Nov 27 11:17:31 2009 -0500
@@ -579,6 +579,8 @@ public class Launcher {
group.setApplication(appletInstance);
loader.setApplication(appletInstance);
+
+ setContextClassLoaderForAllThreads(appletInstance.getClassLoader());
return appletInstance;
}
diff -r 610a316e54d2 -r d9377bd6e521 rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
--- a/rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Wed Nov 25 11:41:02 2009 +0000
+++ b/rt/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Fri Nov 27 11:17:31 2009 -0500
@@ -130,7 +130,7 @@ class JNLPSecurityManager extends Securi
public void windowDeactivated(WindowEvent e) {
activeApplication = null;
}
-
+
public void windowClosing(WindowEvent e) {
System.err.println("Disposing window");
e.getWindow().dispose();
More information about the distro-pkg-dev
mailing list