United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6635585 Modify plug-in switching mechanism to better support Firefox
6635585 : Modify plug-in switching mechanism to better support Firefox

Details
Type:
Bug
Submit Date:
2007-11-29
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-01-25
Component:
deploy
OS:
windows
Sub-Component:
plugin
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10

Related Reports
Relates:
Relates:

Sub Tasks

Description
In discussions with Mozilla.org it may not be possible to get them to backport the necessary changes from Firefox 3 to make the new Java Plug-In run on top of Firefox 2.

As an alternate solution, we would like to be able to turn on the new Java Plug-In for Firefox 3, while continuing to use the old one for Firefox 2. In order to enable this functionality, changes on the browser side are needed. Mozilla bug 406040 has been filed, and a patch supplied: https://bugzilla.mozilla.org/show_bug.cgi?id=406040 . We are waiting for a response from Mozilla.org regarding the integration of this patch.

Once it is integrated, we will need to change the switching mechanism between the old and new plug-ins. We will need to stop moving files around on the local disk when toggling the switch. The only change will be the setting of the UseNewJavaPlugin registry key. The "unused_plugin" directory will be renamed to "new_plugin", and the only DLL that will be built into that directory will be npjp2.dll. Changes are necessary to the bootstrapping code of the new plug-in to handle the fact that npjp2.dll is being loaded out of a subdirectory of the JRE's bin directory. The installer will need to be modified to put a copy of msvcr71.dll alongside npjp2.dll in the new_plugin directory. The latter should be done as code in the installer rather than bundling a completely separate copy of this DLL into the bundles.

                                    

Comments
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/deployment_data/6u10/6635585.2
                                     
2007-12-04
EVALUATION

The goal of these changes is to allow the old plug-in to remain the
default in Firefox 2, while allowing the new plug-in to be the default
in Firefox 3. Changes were checked in to Firefox 3 under
https://bugzilla.mozilla.org/show_bug.cgi?id=406040 to support this.
These are the necessary changes on our side to complete the work.

The unused_plugin directory (on Windows) has been removed and replaced
with a "new_plugin" directory. The only DLL we build into it is
npjp2.dll, the new plug-in for Firefox 3. Firefox knows about the
existence of the UseNewJavaPlugin registry key and the new_plugin
subdirectory, and changes where it scans for the Java Plug-In
appropriately. We place a copy of msvcr71.dll in that directory to
allow the system to find it when the browser loads npjp2.dll.

This change simplifies the switching logic in ssvagent.exe
drastically, since no files need to be moved around on disk any more.
The bootstrapping and library loading logic for the new plug-in were
adjusted to understand the presence of the new_plugin directory.

Tested by installing JRE bundle and testing Firefox 2, Firefox 3
(latest nightly build) and Internet Explorer 7 both with and without
the new plug-in as the default. When the new plug-in is the default,
FF 2 uses the old plug-in, while FF 3 and IE 7 use the new plug-in.
When the old plug-in is the default, all three browsers use the old
plug-in. No other test case due to difficulty.
                                     
2007-12-04



Hardware and Software, Engineered to Work Together