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.