Remove ThrowLocation.
Note that this is a cleanup change, and has no functionality change.
The ThrowLocation had no use anymore.
Change-Id: I3d2126af1dc673cec3a0453ff3d56a172663a5f6
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index f0c8819..afb2a06 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -82,8 +82,7 @@
va_list args;
va_start(args, fmt);
Thread* self = Thread::Current();
- ThrowLocation throw_location = self->GetCurrentLocationForThrow();
- self->ThrowNewExceptionV(throw_location, "Ljava/lang/NoClassDefFoundError;", fmt, args);
+ self->ThrowNewExceptionV("Ljava/lang/NoClassDefFoundError;", fmt, args);
va_end(args);
}
@@ -105,14 +104,13 @@
mirror::Throwable* pre_allocated = runtime->GetPreAllocatedNoClassDefFoundError();
self->SetException(pre_allocated);
} else {
- ThrowLocation throw_location = self->GetCurrentLocationForThrow();
if (c->GetVerifyErrorClass() != NULL) {
// TODO: change the verifier to store an _instance_, with a useful detail message?
std::string temp;
- self->ThrowNewException(throw_location, c->GetVerifyErrorClass()->GetDescriptor(&temp),
+ self->ThrowNewException(c->GetVerifyErrorClass()->GetDescriptor(&temp),
PrettyDescriptor(c).c_str());
} else {
- self->ThrowNewException(throw_location, "Ljava/lang/NoClassDefFoundError;",
+ self->ThrowNewException("Ljava/lang/NoClassDefFoundError;",
PrettyDescriptor(c).c_str());
}
}
@@ -141,9 +139,7 @@
// We only wrap non-Error exceptions; an Error can just be used as-is.
if (!is_error) {
- ThrowLocation throw_location = self->GetCurrentLocationForThrow();
- self->ThrowNewWrappedException(throw_location, "Ljava/lang/ExceptionInInitializerError;",
- nullptr);
+ self->ThrowNewWrappedException("Ljava/lang/ExceptionInInitializerError;", nullptr);
}
VlogClassInitializationFailure(klass);
}
@@ -2259,8 +2255,8 @@
return nullptr;
} else if (result.get() == nullptr) {
// broken loader - throw NPE to be compatible with Dalvik
- ThrowNullPointerException(nullptr, StringPrintf("ClassLoader.loadClass returned null for %s",
- class_name_string.c_str()).c_str());
+ ThrowNullPointerException(StringPrintf("ClassLoader.loadClass returned null for %s",
+ class_name_string.c_str()).c_str());
return nullptr;
} else {
// success, return mirror::Class*