Skip to content

Commit 8f869a3

Browse files
szuendCommit Bot
authored andcommitted
Check for non-existent context before unwrapping debug evaluate context
This CL attempts to fix a chrome crash seen in the wild. Without a reproducer, the current working theory is that we hit a 'null' context in some edge case, causing us to access an empty handle. This CL prevents the empty context handle to be dereferenced. [email protected] Bug: chromium:1038747 Change-Id: Icd6f4853a22ddbf1e504f0f0f90c065b3437f8ab Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000752 Reviewed-by: Simon Zünd <[email protected]> Commit-Queue: Simon Zünd <[email protected]> Cr-Commit-Position: refs/heads/master@{#65776}
1 parent 1bf7116 commit 8f869a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/debug/debug-scopes.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void ScopeIterator::TryParseAndRetrieveScopes(ReparseStrategy strategy) {
300300
}
301301

302302
void ScopeIterator::UnwrapEvaluationContext() {
303-
if (!context_->IsDebugEvaluateContext()) return;
303+
if (context_->is_null() || !context_->IsDebugEvaluateContext()) return;
304304
Context current = *context_;
305305
do {
306306
Object wrapped = current.get(Context::WRAPPED_CONTEXT_INDEX);

0 commit comments

Comments
 (0)