EVALUATION
This is a regression caused by the fix for:
CR 6576321: Browser hang by a deadlock with open and close applet repeatedly
It was integrated into 5.0u14 b02. I couldn't reproduce the issue with any JDK 1.4.2 or JDK 6 release. (I tried 1.4.2_18, 5.0u7, 5.0u10, 5.0u12, 5.0u13, 6, 6u2, 6u7, 6u10 - all of them passed the test.)
The webrev of the fix for CR 6576321 is available here:
http://sa.sfbay.sun.com/projects/deployment_data/5.0u13/6576321.1
Experiments with an instrumented version confirmed the following behaviour. The applet's AppletContext onClose() method is called on the page reloading event with the following stack trace:
sun.plugin.viewer.context.DefaultPluginAppletContext.onClose
sun.plugin.viewer.context.IExplorerAppletContext.onClose
sun.plugin.viewer.IExplorerPluginObject.destroyPlugin
It sets the DefaultPluginAppletContext's closed field to true. In the legacy lifecycle, the applet panel is stored in the cache. When the page is reloaded, the panel is retrieved from the cache, and the AppletContext associated with the panel is set as the current AppletContext. But its closed field is still set to true. This AppletContext is reused by a new IExplorerPluginObject, causing the exception.
The fix is to reset the closed field to false in the IExplorerPluginObject's (and other Mozilla's PluginObject's) constructor if the AppletContext is got from the cached panel.
Also, it was noticed that a part of the fix for CR 6576321 was missed during
integration into 5.0u14 b02:
src/plugin/share/classes/sun/plugin/javascript/navig5/JSObject.java
doesn't contain any actual changes. It also should be fixed.
*** (#1 of 1): [ UNSAVED ] ###@###.###
|