Closed Bug 443645 Opened 16 years ago Closed 13 years ago

LiveConnect broken, communication between java applet and javascript throws ClassCastException

Categories

(Core Graveyard :: Java: Live Connect, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mario_luis_gomes, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.9) Gecko/2008052906 Firefox/3.0

8 out of 10 times this call from within an java applet is failing:

----- Java code

Object appletObj = (JSObject) win.getMember("localAccessApplet");

--------------------

It throws this exception:

java.lang.ClassCastException: java.lang.String cannot be cast to netscape.javascript.JSObject

For some reason it thinks that the returned object is of type String. This works in IE 7, and sometimes also works in FireFox 3. This was working fine in FireFox 2.

When printing the content of appletObj, it outputs "[object Object]". 

The javascript looks like:

----- Javascript

var localAccessApplet = new Object();

-----



Reproducible: Sometimes

Steps to Reproduce:
1.
2.
3.
Component: Extension Compatibility → Java: Live Connect
Product: Firefox → Core
QA Contact: extension.compatibility → live-connect
Product: Core → Core Graveyard
Firefox code moved from custom Liveconnect code to the NPAPI/NPRuntime bridge a while back. Mass-closing the bugs in the liveconnect component which are likely invalid. If you believe that this bug is still relevant to modern versions of Firefox, please reopen it and move it the "Core" product, component "Plug-Ins".
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.