mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
Merge
This commit is contained in:
commit
db5f26110b
109 changed files with 2017 additions and 1874 deletions
|
@ -145,7 +145,7 @@ void Exceptions::_throw(Thread* thread, const char* file, int line, Handle h_exc
|
|||
p2i(h_exception()), file, line, p2i(thread));
|
||||
}
|
||||
// for AbortVMOnException flag
|
||||
NOT_PRODUCT(Exceptions::debug_check_abort(h_exception, message));
|
||||
Exceptions::debug_check_abort(h_exception, message);
|
||||
|
||||
// Check for special boot-strapping/vm-thread handling
|
||||
if (special_exception(thread, file, line, h_exception)) {
|
||||
|
@ -477,13 +477,12 @@ ExceptionMark::~ExceptionMark() {
|
|||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
#ifndef PRODUCT
|
||||
// caller frees value_string if necessary
|
||||
void Exceptions::debug_check_abort(const char *value_string, const char* message) {
|
||||
if (AbortVMOnException != NULL && value_string != NULL &&
|
||||
strstr(value_string, AbortVMOnException)) {
|
||||
if (AbortVMOnExceptionMessage == NULL || message == NULL ||
|
||||
strcmp(message, AbortVMOnExceptionMessage) == 0) {
|
||||
if (AbortVMOnExceptionMessage == NULL || (message != NULL &&
|
||||
strstr(message, AbortVMOnExceptionMessage))) {
|
||||
fatal("Saw %s, aborting", value_string);
|
||||
}
|
||||
}
|
||||
|
@ -491,14 +490,17 @@ void Exceptions::debug_check_abort(const char *value_string, const char* message
|
|||
|
||||
void Exceptions::debug_check_abort(Handle exception, const char* message) {
|
||||
if (AbortVMOnException != NULL) {
|
||||
ResourceMark rm;
|
||||
if (message == NULL && exception->is_a(SystemDictionary::Throwable_klass())) {
|
||||
oop msg = java_lang_Throwable::message(exception);
|
||||
if (msg != NULL) {
|
||||
message = java_lang_String::as_utf8_string(msg);
|
||||
}
|
||||
}
|
||||
debug_check_abort(InstanceKlass::cast(exception()->klass())->external_name(), message);
|
||||
debug_check_abort_helper(exception, message);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Exceptions::debug_check_abort_helper(Handle exception, const char* message) {
|
||||
ResourceMark rm;
|
||||
if (message == NULL && exception->is_a(SystemDictionary::Throwable_klass())) {
|
||||
oop msg = java_lang_Throwable::message(exception);
|
||||
if (msg != NULL) {
|
||||
message = java_lang_String::as_utf8_string(msg);
|
||||
}
|
||||
}
|
||||
debug_check_abort(InstanceKlass::cast(exception()->klass())->external_name(), message);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue