This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: FYI: JNI and synchronized native
- From: Tom Tromey <tromey at redhat dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 12 Dec 2001 22:14:36 -0700
- Subject: Re: Patch: FYI: JNI and synchronized native
- References: <Pine.LNX.4.10.10112122307001.16772-100000@mars.deadcafe.org>
- Reply-to: tromey at redhat dot com
>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:
>> + if (sync != NULL)
>> + _Jv_MonitorExit (sync);
Jeff> I don't see a cleanup here. What happens to the monitor if an
Jeff> exception is thrown from the called function?
The monitor remains held. Obviously this would be bad.
Do we need to support the ability to throw a C++ exception from a JNI
call? I would imagine this would break just about any JVM. In this
context, Java exceptions can only be thrown via the appropriate JNI
call; we handle that case correctly.
Tom