From 28bd2e4f151267b34b8e1eb19c489d8d547bbf5c Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 4 Oct 2016 13:54:57 -0700 Subject: Move mirror::Class to use ObjPtr Leave the return types as non ObjPtr for now. Fixed moving GC bugs in tests. Test: test-art-host Bug: 31113334 Change-Id: I5da1b5ac55dfbc5cc97a64be2c870ba9f512d9b0 --- runtime/debugger.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/debugger.cc') diff --git a/runtime/debugger.cc b/runtime/debugger.cc index ada1a237d6..3977e4926a 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -39,6 +39,7 @@ #include "handle_scope.h" #include "jdwp/jdwp_priv.h" #include "jdwp/object_registry.h" +#include "jvalue-inl.h" #include "mirror/class.h" #include "mirror/class-inl.h" #include "mirror/class_loader.h" @@ -1289,7 +1290,7 @@ JDWP::JdwpError Dbg::CreateObject(JDWP::RefTypeId class_id, JDWP::ObjectId* new_ return error; } Thread* self = Thread::Current(); - mirror::Object* new_object; + ObjPtr new_object; if (c->IsStringClass()) { // Special case for java.lang.String. gc::AllocatorType allocator_type = Runtime::Current()->GetHeap()->GetCurrentAllocator(); @@ -1304,7 +1305,7 @@ JDWP::JdwpError Dbg::CreateObject(JDWP::RefTypeId class_id, JDWP::ObjectId* new_ *new_object_id = 0; return JDWP::ERR_OUT_OF_MEMORY; } - *new_object_id = gRegistry->Add(new_object); + *new_object_id = gRegistry->Add(new_object.Ptr()); return JDWP::ERR_NONE; } -- cgit v1.2.3-59-g8ed1b