Commit 05cf6166 authored by Marja Hölttä's avatar Marja Hölttä Committed by V8 LUCI CQ

[debugger] Fail silently even harder

If parsing fails in ScopeIterator::TryParseAndRetrieveScopes, the
intention was to fail silently (see the TODO there). However,
closure_scope_ being nullptr caused us to fail less silently.

This alone is not enough for fixing chromium:1316811 but the other
fixes needed are sufficiently unrelated.

Bug: chromium:1316811
Change-Id: I4eb0f5a13fa4da5fd5dd7ff76a1aa1a6a8ee4c63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3716477Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81300}
parent 0fe567e7
...@@ -650,7 +650,9 @@ bool ScopeIterator::SetVariableValue(Handle<String> name, ...@@ -650,7 +650,9 @@ bool ScopeIterator::SetVariableValue(Handle<String> name,
} }
bool ScopeIterator::ClosureScopeHasThisReference() const { bool ScopeIterator::ClosureScopeHasThisReference() const {
return !closure_scope_->has_this_declaration() && // closure_scope_ can be nullptr if parsing failed. See the TODO in
// TryParseAndRetrieveScopes.
return closure_scope_ && !closure_scope_->has_this_declaration() &&
closure_scope_->HasThisReference(); closure_scope_->HasThisReference();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment