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

Commit f16da19a authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "SoundPool: Set completion flag before promise" into rvc-dev am:...

Merge "SoundPool: Set completion flag before promise" into rvc-dev am: 42ee916c am: c2dba410 am: c6888738 am: b50cfd0c

Change-Id: I4ccd937b54a9cd04b900d6efa81ea8dc67f34853
parents fd7ff25b b50cfd0c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -70,9 +70,10 @@ private:
    static int staticFunction(void *data) {
        JavaThread *jt = static_cast<JavaThread *>(data);
        jt->mF();
        jt->mIsClosed = true;  // set the flag that we are closed
                               // now before we allow the destructor to execute;
                               // otherwise there may be a use after free.
        jt->mPromise.set_value();
        jt->mIsClosed = true;  // publicly inform that we are closed
                               // after we have accessed all variables.
        return 0;
    }