diff options
Diffstat (limited to 'src/thread.h')
-rw-r--r-- | src/thread.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/thread.h b/src/thread.h index 4e1f0e7a03..112db2d71f 100644 --- a/src/thread.h +++ b/src/thread.h @@ -319,8 +319,16 @@ class PACKED Thread { DCHECK(!IsExceptionPending()); } + void DeliverException(Throwable* exception) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { + if (exception == NULL) { + ThrowNewException("Ljava/lang/NullPointerException;", "throw with null exception"); + } else { + SetException(exception); + } + } + // Find catch block and perform long jump to appropriate exception handle - void DeliverException() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + void QuickDeliverException() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); Context* GetLongJumpContext(); void ReleaseLongJumpContext(Context* context) { |