United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7073628 : DT: message boxes shouldn't be shown during JRE/FX installation if javascript callback is used

Details
Type:
Bug
Submit Date:
2011-08-01
Status:
Closed
Updated Date:
2011-11-28
Project Name:
JDK
Resolved Date:
2011-11-28
Component:
deploy
OS:
windows_xp
Sub-Component:
deployment_toolkit
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7-client
Fixed Versions:
7u2 (b03)

Related Reports
Backport:
Relates:

Sub Tasks

Description
Fix for 7052499 allows DT to callback to a javascript function to report JRE and FX installation status. This CR is to prevent the existing message boxes from being shown if javascript callback is used during installation.

                                    

Comments
EVALUATION

A fix is to add a isSilentErrors() method in the IntallCallback class. The method returns true if either the silent flag is set or a javascript callback is defined. JREInstall.install() and JavaFX.install() calls the isSilentErrors and display MessageBox if the method returns false.

This webrev also contains the following fixes:

1) FF crash crash on reload which the download FX dialog is being displayed
   The cause is that the mNPP became invalid inside NotifyInstallStatus when 
calling pluginThreadAysncCall.
   Fix is to set the mNPP to NULL in ~ScriptablePluginObject() within a critical section. In NotifyInstallStatus, null check mNPP inside the same critical section and call pluginThreadAsyncCall if it isn't null.

2) Forgot to report status upon cancel on download.
   Fixed in JREInstall.install() and JavaFX.install(). There's no issue with the FX download thread. The onOk and onCancel methods in CDownloadDialog are synchronized with the download thread.

3) Missing install status sometimes.
   The problem is due to synchronization issue between pluginThreadCallback and NotifyInstallStatus in ScriptablePluginObject. NPN_InvokeDefault fails sometimes if NotifyInstallStatus returns too soon. By the time pluginThreadCallback is invoked, the NPObject may become invalid if the destructor of MozInstallCallback has been invoked.
    A fix is to add a handle to synchronize the pluginThreadCallback and NotifyInstallStatus methods. NotifyInstallStatus will wait for pluginThreadCallback to finish and then release the allocated resources including the handle.
                                     
2011-08-16



Hardware and Software, Engineered to Work Together