| Index: src/debug/debug.cc
|
| diff --git a/src/debug/debug.cc b/src/debug/debug.cc
|
| index a99ea3f15c7f6f209dc1032515cf9dd5f49f5b5e..5323c13a90902ed4e7d2f033e53cff481a47458f 100644
|
| --- a/src/debug/debug.cc
|
| +++ b/src/debug/debug.cc
|
| @@ -1697,6 +1697,11 @@ void Debug::OnPromiseReject(Handle<Object> promise, Handle<Object> value) {
|
|
|
|
|
| void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
|
| + // We cannot generate debug events when JS execution is disallowed.
|
| + // TODO(5530): Reenable debug events within DisallowJSScopes once relevant
|
| + // code (MakeExceptionEvent and ProcessDebugEvent) have been moved to C++.
|
| + if (!AllowJavascriptExecution::IsAllowed(isolate_)) return;
|
| +
|
| Isolate::CatchType catch_type = isolate_->PredictExceptionCatcher();
|
|
|
| // Don't notify listener of exceptions that are internal to a desugaring.
|
|
|