summaryrefslogtreecommitdiffstats
path: root/runtime/common_throws.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-05-16 10:59:25 -0700
committerMathieu Chartier <mathieuc@google.com>2014-05-18 12:50:33 -0700
commitf832284dd847ff077577bb5712225430bbbb3b67 (patch)
tree44f6b91098639c6ebc438b4ec998d0dc128cef9a /runtime/common_throws.cc
parent8f0776768712b2021aa8fb649b51017b9f0fc7a9 (diff)
downloadart-f832284dd847ff077577bb5712225430bbbb3b67.tar.gz
art-f832284dd847ff077577bb5712225430bbbb3b67.tar.bz2
art-f832284dd847ff077577bb5712225430bbbb3b67.zip
Delete ClassHelper and fix compaction bug in GetDirectInterface
Cleanup helps to prevent compaction bugs. Fixed a fairly serious compaction error caused by calling ClassHelper::GetDirectInterface without handling the case where it causes thread suspension due to ResolveType. Bug: 8981901 Change-Id: I82b3bb6dd48d21eb6ece7aae0733c4a23c2bc408
Diffstat (limited to 'runtime/common_throws.cc')
-rw-r--r--runtime/common_throws.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/common_throws.cc b/runtime/common_throws.cc
index 315f274788..a3e3cfad7e 100644
--- a/runtime/common_throws.cc
+++ b/runtime/common_throws.cc
@@ -36,8 +36,7 @@ namespace art {
static void AddReferrerLocation(std::ostream& os, mirror::Class* referrer)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
if (referrer != NULL) {
- ClassHelper kh(referrer);
- std::string location(kh.GetLocation());
+ std::string location(referrer->GetLocation());
if (!location.empty()) {
os << " (declaration of '" << PrettyDescriptor(referrer)
<< "' appears in " << location << ")";
@@ -297,10 +296,9 @@ void ThrowNegativeArraySizeException(const char* msg) {
void ThrowNoSuchFieldError(const StringPiece& scope, mirror::Class* c,
const StringPiece& type, const StringPiece& name)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- ClassHelper kh(c);
std::ostringstream msg;
msg << "No " << scope << "field " << name << " of type " << type
- << " in class " << kh.GetDescriptor() << " or its superclasses";
+ << " in class " << c->GetDescriptor() << " or its superclasses";
ThrowException(NULL, "Ljava/lang/NoSuchFieldError;", c, msg.str().c_str());
}
@@ -309,9 +307,8 @@ void ThrowNoSuchFieldError(const StringPiece& scope, mirror::Class* c,
void ThrowNoSuchMethodError(InvokeType type, mirror::Class* c, const StringPiece& name,
const Signature& signature) {
std::ostringstream msg;
- ClassHelper kh(c);
msg << "No " << type << " method " << name << signature
- << " in class " << kh.GetDescriptor() << " or its super classes";
+ << " in class " << c->GetDescriptor() << " or its super classes";
ThrowException(NULL, "Ljava/lang/NoSuchMethodError;", c, msg.str().c_str());
}