src/share/vm/prims/jvmtiEnvBase.hpp
Print this page
@@ -531,12 +531,16 @@
_count_ptr = count_ptr;
}
VMOp_Type type() const { return VMOp_GetFrameCount; }
jvmtiError result() { return _result; }
void doit() {
+ _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
+ JavaThread* jt = _state->get_thread();
+ if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) {
_result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr);
}
+ }
};
// VM operation to frame location at safepoint.
class VM_GetFrameLocation : public VM_Operation {
private:
@@ -557,13 +561,17 @@
_location_ptr = location_ptr;
}
VMOp_Type type() const { return VMOp_GetFrameLocation; }
jvmtiError result() { return _result; }
void doit() {
+ _result = JVMTI_ERROR_THREAD_NOT_ALIVE;
+ if (Threads::includes(_java_thread) && !_java_thread->is_exiting() &&
+ _java_thread->threadObj() != NULL) {
_result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth,
_method_ptr, _location_ptr);
}
+ }
};
// ResourceTracker
//