зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1917462 - Convert anonymous lambda to a named lambda in FactoryOp::DirectoryLockAcquired; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D219630
This commit is contained in:
Родитель
2a40f1a47a
Коммит
e95b3e3870
|
@ -15075,15 +15075,17 @@ void FactoryOp::DirectoryLockAcquired(DirectoryLock* aLock) {
|
|||
MOZ_ASSERT(mDirectoryLock->Id() >= 0);
|
||||
mDirectoryLockId = mDirectoryLock->Id();
|
||||
|
||||
QM_WARNONLY_TRY(MOZ_TO_RESULT(DirectoryOpen()), [this](const nsresult rv) {
|
||||
SetFailureCodeIfUnset(rv);
|
||||
auto cleanupAndReturn = [self = RefPtr(this)](const nsresult rv) {
|
||||
self->SetFailureCodeIfUnset(rv);
|
||||
|
||||
// The caller holds a strong reference to us, no need for a self reference
|
||||
// before calling Run().
|
||||
|
||||
mState = State::SendingResults;
|
||||
MOZ_ALWAYS_SUCCEEDS(Run());
|
||||
});
|
||||
self->mState = State::SendingResults;
|
||||
MOZ_ALWAYS_SUCCEEDS(self->Run());
|
||||
};
|
||||
|
||||
QM_WARNONLY_TRY(MOZ_TO_RESULT(DirectoryOpen()), cleanupAndReturn);
|
||||
}
|
||||
|
||||
void FactoryOp::DirectoryLockFailed() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче