Commit 7d6cb4fb authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[bytecode] Fix ClearFrameCacheFromSourcePositionTable

Fixes BytecodeArray::ClearFrameCacheFromSourcePositionTable when used
with lazy source positions.  This fixes
cctest/test-serialize/CachedCompileFunctionInContext when used with
--enable-lazy-source-positions and --stress-lazy-source-positions.

R=rmcilroy@chromium.org

Bug: v8:8510
Change-Id: I8c6e8fb944c87636307f62e8d738bfc72463a2f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706487
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62790}
parent 7f0f6446
......@@ -741,7 +741,9 @@ ByteArray BytecodeArray::SourcePositionTableIfCollected() const {
void BytecodeArray::ClearFrameCacheFromSourcePositionTable() {
Object maybe_table = 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());
set_source_position_table(SourcePositionTableWithFrameCache::cast(maybe_table)
.source_position_table());
......
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