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/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index 9d84e4a..149c6b4 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -613,9 +613,8 @@
inline void UnlockJniSynchronizedMethod(jobject locked, Thread* self) {
// Save any pending exception over monitor exit call.
mirror::Throwable* saved_exception = NULL;
- ThrowLocation saved_throw_location;
if (UNLIKELY(self->IsExceptionPending())) {
- saved_exception = self->GetException(&saved_throw_location);
+ saved_exception = self->GetException();
self->ClearException();
}
// Decode locked object and unlock, before popping local references.
@@ -624,11 +623,11 @@
LOG(FATAL) << "Synchronized JNI code returning with an exception:\n"
<< saved_exception->Dump()
<< "\nEncountered second exception during implicit MonitorExit:\n"
- << self->GetException(NULL)->Dump();
+ << self->GetException()->Dump();
}
// Restore pending exception.
if (saved_exception != NULL) {
- self->SetException(saved_throw_location, saved_exception);
+ self->SetException(saved_exception);
}
}