Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: src/debug/debug.cc

Issue 2490023004: Merged: [debug] Disable debug events if JS execution is disallowed (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/debugger/debug/regress/regress-662674.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index e04695771bf1f1c7755832ad10c240853a56ad6a..cce167f942934f1254a71dd4494b2e35b7c8ceea 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1701,6 +1701,11 @@ MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler(
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.
« no previous file with comments | « no previous file | test/debugger/debug/regress/regress-662674.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698