Remove Dbg::IsSuspended, which was checking the wrong thing.
It was also unnecessarily racy.
Change-Id: I9d59ac81ffb5b178ca9d2a00d895a272321adec9
diff --git a/src/jdwp/jdwp_handler.cc b/src/jdwp/jdwp_handler.cc
index 890bc29..1732ea5 100644
--- a/src/jdwp/jdwp_handler.cc
+++ b/src/jdwp/jdwp_handler.cc
@@ -1010,18 +1010,8 @@
uint32_t start_frame = Read4BE(&buf);
uint32_t length = Read4BE(&buf);
- bool is_suspended;
- JdwpError error = Dbg::IsSuspended(thread_id, is_suspended);
- if (error != ERR_NONE) {
- return error;
- }
- if (!is_suspended) {
- LOG(WARNING) << StringPrintf(" Rejecting req for frames in running thread %#llx", thread_id);
- return ERR_THREAD_NOT_SUSPENDED;
- }
-
size_t actual_frame_count;
- error = Dbg::GetThreadFrameCount(thread_id, actual_frame_count);
+ JdwpError error = Dbg::GetThreadFrameCount(thread_id, actual_frame_count);
if (error != ERR_NONE) {
return error;
}
@@ -1051,18 +1041,8 @@
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
ObjectId thread_id = ReadObjectId(&buf);
- bool is_suspended;
- JdwpError error = Dbg::IsSuspended(thread_id, is_suspended);
- if (error != ERR_NONE) {
- return error;
- }
- if (!is_suspended) {
- LOG(WARNING) << StringPrintf(" Rejecting req for frames in running thread %#llx", thread_id);
- return ERR_THREAD_NOT_SUSPENDED;
- }
-
size_t frame_count;
- error = Dbg::GetThreadFrameCount(thread_id, frame_count);
+ JdwpError error = Dbg::GetThreadFrameCount(thread_id, frame_count);
if (error != ERR_NONE) {
return error;
}