JDK-6607404 : Finish LiveConnect support for Mozilla browser family
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u5
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-09-20
  • Updated: 2010-04-04
  • Resolved: 2007-10-31
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.
Related Reports
Duplicate :  
The LiveConnect (Java/JavaScript communication) support needs to be finished for the Mozilla browser family. Support for the "Packages" and "java" JavaScript keywords needs to be added. Support for the "new" JavaScript keyword to instantiate Java classes needs to be added. Help is needed from Mozilla.org to enable this functionality via NPRuntime rather than the OJI used by the current Java Plug-In.

EVALUATION This bug is being marked as a duplicate of 6622332 for bookkeeping purposes and does not need to be re-verified independently. In the case of a regression please file a new bug.

SUGGESTED FIX http://analemma.sfbay.sun.com/net/jano2/export2/hotspot/users/kbr/webrevs/mjre/6607404_mozilla_liveconnect/

EVALUATION Added support for "Packages" and "java" JavaScript keywords by adding support for a dummy plugin instance / applet not associated with a window. The scriptable NPObject associated with this plugin instance is, by private convention between Sun and Mozilla, the root of the Java name space (the "Packages" keyword). The workaround code which attempted to define "Packages" and "java" keywords in the scope of the JavaScript window has been removed. The private application/x-java-vm-npruntime MIME type (not exposed to user code) has been added to identify the NPRuntime-capable Java Plug-In to the Mozilla browser family (again, by private convention between Sun and Mozilla). As part of these changes, it was necessary to switch over to using the NPN_PluginThreadAsyncCall mechanism rather than subclassing the plugin window's WndProc and sending a Windows message to that window. The result is that almost all platform-dependent code in the Mozilla plugin has been eliminated. There is now a hard requirement that this API be present on the browser side. Currently this means that the Firefox 3 nightly builds must be used. Mozilla has indicated that they are willing to backport these changes to the Firefox 2 tree, with a likely date for appearance sometime in December 2007. Added support for the "new" JavaScript keyword via NPConstruct function pointer in NPClass. Removed workaround (verified as being unnecessary) for manually reverting NPClass struct version to older value. Fixed problem where boxing objects for primitive types as results of "new" expressions were being unboxed, causing errors to be reported in the Mozilla JavaScript engine. Added synthetic "toString" operation for JavaNameSpace objects. Tested with IE and Firefox 3 (latest development code, not yet in nightly builds) on Windows.