Skip to content

Commit 3155058

Browse files
verwaestV8 LUCI CQ
authored andcommitted
[compiler] Skip scope infos on "new scripts"
They aren't reachable anyway. They might exist if we serialized the code cache after eval ran though. Change-Id: Icdfa71edad6ad8d8e9a040e4088c7ad4eb4291f3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5713171 Auto-Submit: Toon Verwaest <[email protected]> Commit-Queue: Leszek Swirski <[email protected]> Reviewed-by: Leszek Swirski <[email protected]> Commit-Queue: Toon Verwaest <[email protected]> Cr-Commit-Position: refs/heads/main@{#95060}
1 parent 56dc606 commit 3155058

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/codegen/compiler.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,9 +2226,10 @@ void BackgroundMergeTask::BeginMergeInBackground(
22262226
DisallowGarbageCollection no_gc;
22272227
Tagged<MaybeObject> maybe_new_sfi = new_script->infos()->get(i);
22282228
Tagged<MaybeObject> maybe_old_info = old_script->infos()->get(i);
2229-
if (maybe_new_sfi.IsWeak()) {
2230-
// Since we're just compiled the new script, we're certain that we can
2231-
// only see shared function infos here.
2229+
// We might have scope infos in the table if it's deserialized from a code
2230+
// cache.
2231+
if (maybe_new_sfi.IsWeak() &&
2232+
Is<SharedFunctionInfo>(maybe_new_sfi.GetHeapObjectAssumeWeak())) {
22322233
Tagged<SharedFunctionInfo> new_sfi =
22332234
Cast<SharedFunctionInfo>(maybe_new_sfi.GetHeapObjectAssumeWeak());
22342235
if (maybe_old_info.IsWeak()) {

0 commit comments

Comments
 (0)