Commit cfe6ceae authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

Fix crash Code::DropStackFrameCacheCommon

Fixes DCHECK failure in DropStackFrameCacheCommon by returning early if
the source_position_table is Exception.

Bug: chromium:990582, v8:8510
Change-Id: I671f3e0cdc9f880dedf8ecd2fffb1083229dc6dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1752856Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63209}
parent b01df03f
......@@ -193,7 +193,10 @@ namespace {
template <typename Code>
void DropStackFrameCacheCommon(Code code) {
i::Object maybe_table = code.source_position_table();
if (maybe_table.IsUndefined() || maybe_table.IsByteArray()) return;
if (maybe_table.IsUndefined() || maybe_table.IsByteArray() ||
maybe_table.IsException()) {
return;
}
DCHECK(maybe_table.IsSourcePositionTableWithFrameCache());
code.set_source_position_table(
i::SourcePositionTableWithFrameCache::cast(maybe_table)
......
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --invoke-weak-callbacks --budget-for-feedback-vector-allocation=0
__v_0 = 0;
function __f_0() {
try {
__f_0();
} catch(e) {
if (__v_0 < 50) {
__v_0++;
/()/g, new [];
}
}
}
__f_0();
Realm.shared = this;
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