| Index: src/top.cc
|
| ===================================================================
|
| --- src/top.cc (revision 7030)
|
| +++ src/top.cc (working copy)
|
| @@ -620,7 +620,7 @@
|
| }
|
|
|
|
|
| -bool Isolate::ShouldReturnException(bool* is_caught_externally,
|
| +bool Isolate::ShouldReportException(bool* can_be_caught_externally,
|
| bool catchable_by_javascript) {
|
| // Find the top-most try-catch handler.
|
| StackHandler* handler =
|
| @@ -637,11 +637,11 @@
|
| // The exception has been externally caught if and only if there is
|
| // an external handler which is on top of the top-most try-catch
|
| // handler.
|
| - *is_caught_externally = external_handler_address != NULL &&
|
| + *can_be_caught_externally = external_handler_address != NULL &&
|
| (handler == NULL || handler->address() > external_handler_address ||
|
| !catchable_by_javascript);
|
|
|
| - if (*is_caught_externally) {
|
| + if (*can_be_caught_externally) {
|
| // Only report the exception if the external handler is verbose.
|
| return thread_local_top()->TryCatchHandler()->is_verbose_;
|
| } else {
|
| @@ -662,15 +662,15 @@
|
| Handle<Object> exception_handle(exception_object);
|
|
|
| // Determine reporting and whether the exception is caught externally.
|
| - bool is_caught_externally = false;
|
| bool is_out_of_memory = exception == Failure::OutOfMemoryException();
|
| bool is_termination_exception = exception == heap_.termination_exception();
|
| bool catchable_by_javascript = !is_termination_exception && !is_out_of_memory;
|
| // Only real objects can be caught by JS.
|
| ASSERT(!catchable_by_javascript || is_object);
|
| - bool should_return_exception =
|
| - ShouldReturnException(&is_caught_externally, catchable_by_javascript);
|
| - bool report_exception = catchable_by_javascript && should_return_exception;
|
| + bool is_caught_externally = false;
|
| + bool should_report_exception =
|
| + ShouldReportException(&is_caught_externally, catchable_by_javascript);
|
| + bool report_exception = catchable_by_javascript && should_report_exception;
|
|
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| // Notify debugger of exception.
|
|
|