Use handles for GetReferringObjects
Required since VisitObjects may cause thread suspension. Fixes
failing jdwp tests.
Test: test-art-host
Test: art/tools/run-jdwp-tests.sh '--mode=host' '--variant=X32' --debug
Bug: 31113334
Change-Id: Ic11780b3778c83e7812bc90c0723a293537f376c
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 95db4dd..796b51d 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -50,6 +50,7 @@
class Thread;
class ThreadPool;
class TimingLogger;
+class VariableSizedHandleScope;
namespace mirror {
class Class;
@@ -348,9 +349,10 @@
REQUIRES_SHARED(Locks::mutator_lock_);
// Implements JDWP OR_ReferringObjects.
- void GetReferringObjects(ObjPtr<mirror::Object> o,
+ void GetReferringObjects(VariableSizedHandleScope& scope,
+ Handle<mirror::Object> o,
int32_t max_count,
- std::vector<ObjPtr<mirror::Object>>& referring_objects)
+ std::vector<Handle<mirror::Object>>& referring_objects)
REQUIRES(!Locks::heap_bitmap_lock_, !*gc_complete_lock_)
REQUIRES_SHARED(Locks::mutator_lock_);