Chromium Code Reviews| Index: src/top.cc |
| =================================================================== |
| --- src/top.cc (revision 567) |
| +++ src/top.cc (working copy) |
| @@ -101,6 +101,7 @@ |
| clear_pending_exception(); |
| clear_scheduled_exception(); |
| thread_local_.save_context_ = NULL; |
| + thread_local_.catcher_ = NULL; |
| } |
| @@ -606,11 +607,6 @@ |
| Failure* Top::ReThrow(Object* exception, MessageLocation* location) { |
| - // Check is this exception is externally caught. |
| - bool is_caught_externally = false; |
| - ShouldReportException(&is_caught_externally); |
| - thread_local_.external_caught_exception_ = is_caught_externally; |
| - |
| // Set the exception beeing re-thrown. |
|
Kasper Lund
2008/10/23 12:52:43
beeing sb. being
|
| set_pending_exception(exception); |
| return Failure::Exception(); |
| @@ -793,7 +789,9 @@ |
| // If the exception is caught externally, we store it in the |
| // try/catch handler. The C code can find it later and process it if |
| // necessary. |
| + thread_local_.catcher_ = NULL; |
| if (is_caught_externally) { |
| + thread_local_.catcher_ = thread_local_.try_catch_handler_; |
| thread_local_.try_catch_handler_->exception_ = |
| reinterpret_cast<void*>(*exception_handle); |
| if (!message_obj.is_null()) { |
| @@ -812,7 +810,6 @@ |
| MessageHandler::ReportMessage(location, message_obj); |
| } |
| } |
| - thread_local_.external_caught_exception_ = is_caught_externally; |
| // NOTE: Notifying the debugger or reporting the exception may have caused |
| // new exceptions. For now, we just ignore that and set the pending exception |