Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c55c68fe authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "libutils: disallow extending lifetime on stack" am: ea25b4ba

parents de527065 ea25b4ba
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -797,6 +797,8 @@ RefBase::~RefBase()

void RefBase::extendObjectLifetime(int32_t mode)
{
    check_not_on_stack(this);

    // Must be happens-before ordered with respect to construction or any
    // operation that could destroy the object.
    mRefs->mFlags.fetch_or(mode, std::memory_order_relaxed);