src/share/vm/prims/jvmtiEventController.cpp

changeset 2446
db2b0f8c1cef
parent 2314
f95d63e2154a
child 2708
1d1603768966
     1.1 --- a/src/share/vm/prims/jvmtiEventController.cpp	Mon Jan 10 17:14:53 2011 -0500
     1.2 +++ b/src/share/vm/prims/jvmtiEventController.cpp	Tue Jan 11 10:06:00 2011 -0500
     1.3 @@ -667,14 +667,13 @@
     1.4  JvmtiEventControllerPrivate::thread_ended(JavaThread *thread) {
     1.5    // Removes the JvmtiThreadState associated with the specified thread.
     1.6    // May be called after all environments have been disposed.
     1.7 +  assert(JvmtiThreadState_lock->is_locked(), "sanity check");
     1.8  
     1.9    EC_TRACE(("JVMTI [%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
    1.10  
    1.11    JvmtiThreadState *state = thread->jvmti_thread_state();
    1.12 -  if (state != NULL) {
    1.13 -    MutexLocker mu(JvmtiThreadState_lock);
    1.14 -    delete state;
    1.15 -  }
    1.16 +  assert(state != NULL, "else why are we here?");
    1.17 +  delete state;
    1.18  }
    1.19  
    1.20  void JvmtiEventControllerPrivate::set_event_callbacks(JvmtiEnvBase *env,

mercurial