[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:
parent
de7d26908f
commit
3ff97ec329
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user