comparison src/share/vm/utilities/preserveException.cpp @ 4916:1b0e0f8be510

7131006: java/lang/management/ThreadMXBean/ThreadLists.java Reviewed-by: dholmes, acorn
author minqi
date Thu, 09 Feb 2012 00:51:47 -0800
parents f95d63e2154a
children b9a9ed0f8eeb
comparison
equal deleted inserted replaced
4892:ea677dbdd883 4916:1b0e0f8be510
30 30
31 PreserveExceptionMark::PreserveExceptionMark(Thread*& thread) { 31 PreserveExceptionMark::PreserveExceptionMark(Thread*& thread) {
32 thread = Thread::current(); 32 thread = Thread::current();
33 _thread = thread; 33 _thread = thread;
34 _preserved_exception_oop = Handle(thread, _thread->pending_exception()); 34 _preserved_exception_oop = Handle(thread, _thread->pending_exception());
35 _thread->clear_pending_exception(); // Needed to avoid infinite recursion
36 _preserved_exception_line = _thread->exception_line(); 35 _preserved_exception_line = _thread->exception_line();
37 _preserved_exception_file = _thread->exception_file(); 36 _preserved_exception_file = _thread->exception_file();
37 _thread->clear_pending_exception(); // Needed to avoid infinite recursion
38 } 38 }
39 39
40 40
41 PreserveExceptionMark::~PreserveExceptionMark() { 41 PreserveExceptionMark::~PreserveExceptionMark() {
42 if (_thread->has_pending_exception()) { 42 if (_thread->has_pending_exception()) {