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

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

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

parents cf323aa2 c55c68fe
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);