LiveConnect broken, communication between java applet and javascript throws ClassCastException

RESOLVED INCOMPLETE

Status

Core Graveyard
Java: Live Connect
--
major
RESOLVED INCOMPLETE
10 years ago
6 years ago

People

(Reporter: Mario Gomes, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
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.

Updated

10 years ago
Component: Extension Compatibility → Java: Live Connect
Product: Firefox → Core
QA Contact: extension.compatibility → live-connect

Updated

7 years ago
Component: Java: Live Connect → Java: Live Connect
Product: Core → Core Graveyard

Comment 1

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.