8324861: Exceptions::wrap_dynamic_exception() doesn't have ResourceMark
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
c3c1d5bd12
commit
7d1a48807a
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -433,6 +433,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
|
||||
// Pass through an Error, including BootstrapMethodError, any other form
|
||||
// of linkage error, or say OutOfMemoryError
|
||||
if (ls != nullptr) {
|
||||
ResourceMark rm(THREAD);
|
||||
ls->print_cr("bootstrap method invocation wraps BSME around " PTR_FORMAT, p2i(exception));
|
||||
exception->print_on(ls);
|
||||
}
|
||||
@ -441,6 +442,7 @@ void Exceptions::wrap_dynamic_exception(bool is_indy, JavaThread* THREAD) {
|
||||
|
||||
// Otherwise wrap the exception in a BootstrapMethodError
|
||||
if (ls != nullptr) {
|
||||
ResourceMark rm(THREAD);
|
||||
ls->print_cr("%s throws BSME for " PTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i(exception));
|
||||
exception->print_on(ls);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user