Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index 5e862874a15626056f67b8686ed5cf5df1279319..708f57712326603702a239c277befd363b536173 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -1029,9 +1029,13 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) { |
| thread_local_top()->rethrowing_message_ = false; |
| - // Notify debugger of exception. |
| + // Notify debugger of exception. Temporarily clear any scheduled_exception |
| + // to allow evaluating JavaScript from the debug event handler. |
| if (catchable_by_javascript) { |
| + Object* saved_scheduled_exception = scheduled_exception(); |
| + clear_scheduled_exception(); |
|
Yang
2014/09/10 14:46:13
Can we put this into OnThrow?
aandrey
2014/09/11 05:48:29
Done.
|
| debug()->OnThrow(exception_handle, report_exception); |
| + thread_local_top()->scheduled_exception_ = saved_scheduled_exception; |
| } |
| // Generate the message if required. |