Chromium Code Reviews| Index: src/debug.cc |
| diff --git a/src/debug.cc b/src/debug.cc |
| index 5bdf53f058e528ff7faf9760f36f45b54a7685a8..46917380d93be7bde33319dbf200e7db87220110 100644 |
| --- a/src/debug.cc |
| +++ b/src/debug.cc |
| @@ -2505,8 +2505,13 @@ MaybeHandle<Object> Debug::MakeAsyncTaskEvent(Handle<JSObject> task_event) { |
| void Debug::OnThrow(Handle<Object> exception, bool uncaught) { |
| if (in_debug_scope() || ignore_events()) return; |
| + // Temporarily clear any scheduled_exception to allow evaluating |
| + // JavaScript from the debug event handler. |
| HandleScope scope(isolate_); |
| + Object* scheduled_exception = isolate_->scheduled_exception(); |
|
Yang
2014/09/11 07:26:05
I just realized that this is not GC-safe. You have
aandrey
2014/09/11 08:20:24
But isolate_->thread_local_top()->scheduled_except
Yang
2014/09/11 08:26:21
Also, this getter asserts that we have a scheduled
aandrey
2014/09/11 08:47:22
Done.
|
| + isolate_->clear_scheduled_exception(); |
| OnException(exception, uncaught, isolate_->GetPromiseOnStackOnThrow()); |
| + isolate_->thread_local_top()->scheduled_exception_ = scheduled_exception; |
| } |