Commit 8f869a37 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

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.

TBR=yangguo@chromium.org

Bug: chromium:1038747
Change-Id: Icd6f4853a22ddbf1e504f0f0f90c065b3437f8ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000752Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65776}
parent 1bf71164
......@@ -300,7 +300,7 @@ void ScopeIterator::TryParseAndRetrieveScopes(ReparseStrategy strategy) {
}
void ScopeIterator::UnwrapEvaluationContext() {
if (!context_->IsDebugEvaluateContext()) return;
if (context_->is_null() || !context_->IsDebugEvaluateContext()) return;
Context current = *context_;
do {
Object wrapped = current.get(Context::WRAPPED_CONTEXT_INDEX);
......
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