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_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();
}