コード例 #1
0
void BlobResourceHandle::notifyFinish()
{
    if (!m_async) {
        doNotifyFinish(*this);
        return;
    }

    // Schedule to notify the client from a standalone function because the client might dispose the handle immediately from the callback function
    // while we still have BlobResourceHandle calls in the stack.
    callOnMainThread([protectedThis = Ref<BlobResourceHandle>(*this)]() mutable {
        doNotifyFinish(protectedThis);
    });

}
コード例 #2
0
void BlobResourceHandle::notifyFinish()
{
    if (!m_async) {
        doNotifyFinish(*this);
        return;
    }

    // Schedule to notify the client from a standalone function because the client might dispose the handle immediately from the callback function
    // while we still have BlobResourceHandle calls in the stack.
    RefPtr<BlobResourceHandle> handle(this);
    callOnMainThread([handle] {
        doNotifyFinish(*handle);
    });

}
コード例 #3
0
void BlobResourceHandle::notifyFinish()
{
    if (m_async) {
        // Schedule to notify the client from a standalone function because the client might dispose the handle immediately from the callback function
        // while we still have BlobResourceHandle calls in the stack.
        callOnMainThread(doNotifyFinish, this);
        return;
    }

    doNotifyFinish(this);
}