• Michael Lippautz's avatar
    cppgc: Fix CTP for destruction · 5a6c7dee
    Michael Lippautz authored
    This avoids a benign race in setting the raw pointer inside CTP
    destructor by not emitting the write at all. The handle is destructed
    which means that we only need to destroy any backing node but may
    leave the handle untouched.
    
    Drive-by:
    - Add a few more docs.
    - Make Clear() thread-safe.
    - Make assignment of a sentinel pointer thread-safe.
    - Make assignment of a nullptr thread-safe.
    
    Bug: chromium:1242795
    Change-Id: I0d9dafa31c298053e87ba1eb75f99fa6e33fa10b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3114134
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#76455}
    5a6c7dee
cross-thread-persistent.h 14.4 KB