Compute the right catch location for the debugger.
Also remove tls ThrowLocation, it is not needed anymore.
Change-Id: I78fddf09ce968ca475e39c17fa76d699c589c8d9
diff --git a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
index 14ab320..d88d262 100644
--- a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
@@ -29,7 +29,7 @@
extern "C" void artDeoptimize(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
ScopedQuickEntrypointChecks sqec(self);
- self->SetException(ThrowLocation(), Thread::GetDeoptimizationException());
+ self->SetException(Thread::GetDeoptimizationException());
self->QuickDeliverException();
}
diff --git a/runtime/entrypoints/quick/quick_throw_entrypoints.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
index 25df40b..127f9e0 100644
--- a/runtime/entrypoints/quick/quick_throw_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
@@ -41,12 +41,12 @@
* exception_ in thread and delivering the exception.
*/
ScopedQuickEntrypointChecks sqec(self);
- ThrowLocation throw_location = self->GetCurrentLocationForThrow();
if (exception == nullptr) {
+ ThrowLocation throw_location = self->GetCurrentLocationForThrow();
self->ThrowNewException(throw_location, "Ljava/lang/NullPointerException;",
"throw with null exception");
} else {
- self->SetException(throw_location, exception);
+ self->SetException(exception);
}
self->QuickDeliverException();
}