8259486: Replace PreserveExceptionMark with implementation for CautiouslyPreserveExceptionMark

Reviewed-by: dholmes, sspitsyn
This commit is contained in:
Coleen Phillimore 2021-01-13 14:32:52 +00:00
parent ce94512087
commit 535f2da5e2
14 changed files with 51 additions and 100 deletions

View file

@ -1859,12 +1859,6 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
Handle threadObj(this, this->threadObj());
assert(threadObj.not_null(), "Java thread object should be created");
// FIXIT: This code should be moved into else part, when reliable 1.2/1.3 check is in place
{
EXCEPTION_MARK;
CLEAR_PENDING_EXCEPTION;
}
if (!destroy_vm) {
if (uncaught_exception.not_null()) {
EXCEPTION_MARK;
@ -3023,7 +3017,7 @@ class PrintAndVerifyOopClosure: public OopClosure {
// Print or validate the layout of stack frames
void JavaThread::print_frame_layout(int depth, bool validate_only) {
ResourceMark rm;
PRESERVE_EXCEPTION_MARK;
PreserveExceptionMark pm(this);
FrameValues values;
int frame_no = 0;
for (StackFrameStream fst(this, false /* update */, true /* process_frames */); !fst.is_done(); fst.next()) {