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

Unified Diff: src/debug/debug.cc

Issue 2491443002: [debug] Disable debug events if JS execution is disallowed (Closed)
Patch Set: Address comments 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 6564726830609bc65d9ade701c8f3ba007064ff9..cb1f34f390e50b54eab226359e504ec39ca10c7b 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1777,6 +1777,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.
« 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