JDK-6912166 : SSV dialog problems when there are multiple applets on a page
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2009-12-21
  • Updated: 2011-05-04
  • Resolved: 2011-04-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u25-rev b21Fixed 7Fixed
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 ] ###@###.###
19-07-2010