gecko-dev/js
mccabe%netscape.com 1057414fef Fix code to invoke Wrapper interfaces using INVOKEINTERFACE rather than INVOKEVIRTUAL.
Thanks go to Andrew Wason <aw@softcom.com> for finding this problem and providing the patch:



If we implement a Java interface in JavaScript, and a method in that interface returns a Java object, we get a java.lang.IncompatibleClassChangeError: org/mozilla/javascript/Wrapper  exception.

We have attached a sample JavaScript file which duplicates the error.

The problem is JavaAdapter is generating an INVOKEVIRTUAL bytecode to call Wrapper.unwrap, but Wrapper is an interface and so INVOKEINTERFACE should be used instead.  As a result of this change, the IFEQ bytecode generated needs to jump more bytes.  We have attached a patch that fixes the problem.

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com
1999-07-26 10:45:38 +00:00
..
benchmarks Add benchmarks. 1999-06-04 18:44:17 +00:00
js2/java Changes to get traditional functions with args. working 1999-06-15 00:57:05 +00:00
jsd updating readme 1999-06-01 02:31:13 +00:00
jsdj Change MOZILLA_HOME to MOZILLA_FIVE_HOME so that we dont fight Communicator 1999-03-11 20:00:57 +00:00
jsj Deleting obsolete contents of jsj directory 1998-09-24 00:32:24 +00:00
macbuild added files: mozilla/js/src/xpconnect/idl/xpctest2.idl 1999-07-16 20:35:58 +00:00
ref The files in this directory are all obsolete. JavaScript development 1998-10-16 22:18:00 +00:00
rhino Fix code to invoke Wrapper interfaces using INVOKEINTERFACE rather than INVOKEVIRTUAL. 1999-07-26 10:45:38 +00:00
semantics Fixed several semantic errors. Added (?= and (?!. 1999-06-08 00:45:49 +00:00
src Eliminate warning about unsigned/signed == comparison. 1999-07-23 08:24:35 +00:00
tests fixed a versioning problem with the tests. these should succeed now. 1999-07-21 19:20:02 +00:00
.cvsignore more anal tricks. 1999-06-26 05:01:40 +00:00
Makefile.in Adding libxpt and xpconnect to the build. 1999-03-25 07:50:11 +00:00
landbranch.pl Tweaks 1999-04-27 05:08:14 +00:00
makefile.win