Commit 30423732 by Marco Trudel Committed by Tom Tromey

jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects.

2007-02-01 Marco Trudel <mtrudel@gmx.ch>

	* jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects.

From-SVN: r121699
parent 0ccadf45
2007-02-01 Marco Trudel <mtrudel@gmx.ch>
* jni.cc (_Jv_JNI_DeleteWeakGlobalRef): Check for NULL objects.
2007-02-07 Tom Tromey <tromey@redhat.com> 2007-02-07 Tom Tromey <tromey@redhat.com>
* testsuite/libjava.jni/init.c: New file. * testsuite/libjava.jni/init.c: New file.
......
...@@ -1750,6 +1750,10 @@ _Jv_JNI_NewWeakGlobalRef (JNIEnv *env, jobject obj) ...@@ -1750,6 +1750,10 @@ _Jv_JNI_NewWeakGlobalRef (JNIEnv *env, jobject obj)
void JNICALL void JNICALL
_Jv_JNI_DeleteWeakGlobalRef (JNIEnv *, jweak obj) _Jv_JNI_DeleteWeakGlobalRef (JNIEnv *, jweak obj)
{ {
// JDK compatibility.
if (obj == NULL)
return;
using namespace gnu::gcj::runtime; using namespace gnu::gcj::runtime;
JNIWeakRef *ref = reinterpret_cast<JNIWeakRef *> (obj); JNIWeakRef *ref = reinterpret_cast<JNIWeakRef *> (obj);
unmark_for_gc (ref, global_ref_table); unmark_for_gc (ref, global_ref_table);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment