• Michael Lippautz's avatar
    cppgc: Delay CrossThreadPersistent processing · e57ec7ae
    Michael Lippautz authored
    During a final atomic pause CrossThreadPersistent handles need to be
    frozen after they have been marked to avoid any
    WeakCrossThreadPersistent handles creating new strong references
    (through their Lock() call) that would retain objects.
    
    Handles are frozen by acquiring a lock. Since this lock is also taking
    by other threads on WCTP::Lock() this can introduce jank.
    
    This CL improves the situation by delaying processing of CTP
    references until absolutely necessary, i.e., when we have otherwise no
    more objects to mark.
    
    Bug: chromium:1252743
    Change-Id: I872f38c6d24d7955bea74fd59685abd3019b385e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3194253Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77139}
    e57ec7ae
marker.h 7.34 KB