The command is spec-ed to take a type, and return the type's
classloader. The input is thus already a Class, not a generic Object.
Fix the implementation to not always return null.
Bug:
26349019
Change-Id: I4aa075902f4a112624edc644d3540a59eea057c8
if (o == nullptr) {
return JDWP::ERR_INVALID_OBJECT;
}
- expandBufAddObjectId(pReply, gRegistry->Add(o->GetClass()->GetClassLoader()));
+ DCHECK(o->IsClass());
+ expandBufAddObjectId(pReply, gRegistry->Add(o->AsClass()->GetClassLoader()));
return JDWP::ERR_NONE;
}