[cleanup] Simplify logic in Debug::ProcessCompileEvent

Script::IsSubjectToDebugging() returns true for "Normal" and
"WebAssembly" scripts. This is exactly when we want to notify the
debug delegate. We can remove the round-about way this is currently
checked.

R=pfaffe@chromium.org

Bug: None
Change-Id: I1d3b2560043cebffb8eb3db68f58bf0a137abe06
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4208947
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85584}
This commit is contained in:
Simon Zünd 2023-02-01 10:39:09 +01:00 committed by V8 LUCI CQ
parent de7d26908f
commit 3ff97ec329

View File

@ -2500,13 +2500,7 @@ void Debug::ProcessCompileEvent(bool has_compile_error, Handle<Script> script) {
// inspector to filter scripts by native context.
script->set_context_data(isolate_->native_context()->debug_context_id());
if (ignore_events()) return;
#if V8_ENABLE_WEBASSEMBLY
if (!script->IsUserJavaScript() && script->type() != i::Script::TYPE_WASM) {
return;
}
#else
if (!script->IsUserJavaScript()) return;
#endif // V8_ENABLE_WEBASSEMBLY
if (!script->IsSubjectToDebugging()) return;
if (!debug_delegate_) return;
SuppressDebug while_processing(this);
DebugScope debug_scope(this);