United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6912166 SSV dialog problems when there are multiple applets on a page
JDK-6912166 : SSV dialog problems when there are multiple applets on a page

Details
Type:
Bug
Submit Date:
2009-12-21
Status:
Resolved
Updated Date:
2011-05-04
Project Name:
JDK
Resolved Date:
2011-04-07
Component:
deploy
OS:
windows_vista
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u15
Fixed Versions:
6u25-rev (b21)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
SSV dialog problems when there are multiple applets on a page.

http://java.sun.com/javase/6/webnotes/6u10/plugin2/version-selection/ explains 
how to run applets with specific, old jre by java_parameter in applet tag or classid attribute
in object tag.

If a web page has multiple applets, whether it has frames or not, ssv dialog is shown
for each applet, but sometimes dialogs disappears while user press OK button on the
dialog.  As a result, some applets are run on specified, old jre, but others are run
on installed jre6.  Once this happens, visiting the same page would result in 
running the applets on the installed jerk.  Even worse, sometimes IE focus got wrong
and user may not be able to perform any action on the browser other than killing it.

                                    

Comments
EVALUATION

Suggested fix:

 diff -u ../org/ModalitySupport.java sun/plugin2/main/server/ModalitySupport.java
--- ../org/ModalitySupport.java    2010-04-22 13:01:39.000000000 +0900
+++ sun/plugin2/main/server/ModalitySupport.java    2010-04-22 15:02:15.000000000 +0900
@@ -17,7 +17,19 @@
         expected that this will be called from the plugin's main
         thread. */
     public static synchronized void initialize(int appletID, Plugin plugin) {
-        pluginInfoMap.put(new Integer(appletID), new PerPluginInfo(plugin));
+        // "main" thread waits for PerPluginInfo modalityDepth when ssvdialog
+        // is shown.  This method might be called in relaunch path after user
+        // acknowledged ssv dialog.  In that case, we should not replace
+        // existing PerPluginInfo for the applet ID.  If we recreate
+        // PerPluginInfo, that would end up with browser hang since modality
+        // is not cleared.  This would happen when there are multiple
+        // applets on a page. CR#6912166
+        PerPluginInfo ppi = (PerPluginInfo)pluginInfoMap.get(new Integer(appletID));
+        if (ppi == null) {
+          pluginInfoMap.put(new Integer(appletID), new PerPluginInfo(plugin));
+        } else {
+          assert(ppi.getPlugin() == plugin);
+        }
     }

     /** Shuts down modality support for the given applet. */
*** (#1 of 1): [ UNSAVED ] ###@###.###
                                     
2010-07-19



Hardware and Software, Engineered to Work Together