Skip to content

Commit 1320c91

Browse files
ulanCommit Bot
authored andcommitted
[snapshot] Fix clearing of feedback vector in serializer (follow-up 2)
Bug: v8:7857 Change-Id: I3940ae2830adb6c572e079551b7bba7d84462afd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1715444 Reviewed-by: Ross McIlroy <[email protected]> Commit-Queue: Ulan Degenbaev <[email protected]> Cr-Commit-Position: refs/heads/master@{#62881}
1 parent 0edea39 commit 1320c91

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/api/api.cc

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -811,15 +811,10 @@ StartupData SnapshotCreator::CreateBlob(
811811
// Complete in-object slack tracking for all functions.
812812
fun.CompleteInobjectSlackTrackingIfActive();
813813

814+
fun.ResetIfBytecodeFlushed();
815+
814816
// Also, clear out feedback vectors, or any optimized code.
815-
// Note that checking for fun.IsOptimized() || fun.IsInterpreted() is not
816-
// sufficient because the function can have a feedback vector even if it
817-
// is not compiled (e.g. when the bytecode was flushed). On the other
818-
// hand, only checking for the feedback vector is not sufficient because
819-
// there can be multiple functions sharing the same feedback vector. So we
820-
// need all these checks.
821-
if (fun.IsOptimized() || fun.IsInterpreted() ||
822-
!fun.raw_feedback_cell().value().IsUndefined()) {
817+
if (fun.IsOptimized() || fun.IsInterpreted()) {
823818
fun.raw_feedback_cell().set_value(
824819
i::ReadOnlyRoots(isolate).undefined_value());
825820
fun.set_code(isolate->builtins()->builtin(i::Builtins::kCompileLazy));

0 commit comments

Comments
 (0)