aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/lang/natObject.cc2
2 files changed, 7 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 6db73b1..90d2fe4 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * java/lang/natObject.cc (_Jv_ObjectCheckMonitor): Initialize the
+ sync_info element of the object if needed.
+
2005-01-03 Eric Botcazou <ebotcazou@libertysurf.fr>
* testsuite/libjava.lang/Process_4.java (Process_4): Expect only
diff --git a/libjava/java/lang/natObject.cc b/libjava/java/lang/natObject.cc
index 7dff626..d7b67d7 100644
--- a/libjava/java/lang/natObject.cc
+++ b/libjava/java/lang/natObject.cc
@@ -267,6 +267,8 @@ _Jv_MonitorExit (jobject obj)
bool
_Jv_ObjectCheckMonitor (jobject obj)
{
+ if (__builtin_expect (INIT_NEEDED (obj), false))
+ obj->sync_init ();
_Jv_SyncInfo *si = (_Jv_SyncInfo *) obj->sync_info;
return _Jv_MutexCheckMonitor (&si->mutex);
}