Commit fe3b24a6 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[runtime] Make Code::SourcePositionTableIfCollected() read only once

Bug: v8:7790
Change-Id: I8160a3729fcff8037e83eb4566e15b6b0f42781f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2358736Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69428}
parent 2f809531
......@@ -211,9 +211,11 @@ void Code::clear_padding() {
ByteArray Code::SourcePositionTableIfCollected() const {
ReadOnlyRoots roots = GetReadOnlyRoots();
Object maybe_table = source_position_table();
if (maybe_table.IsUndefined(roots) || maybe_table.IsException(roots))
if (maybe_table.IsUndefined(roots) || maybe_table.IsException(roots)) {
return roots.empty_byte_array();
return SourcePositionTable();
}
DCHECK(maybe_table.IsByteArray());
return ByteArray::cast(maybe_table);
}
ByteArray Code::SourcePositionTable() const {
......
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