зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1838894 - webauthn: prevent dispatches to the IPC thread after threads have been shut down r=jschanck
Depends on D183057 Differential Revision: https://phabricator.services.mozilla.com/D185232
This commit is contained in:
Родитель
42f505d658
Коммит
390be83e74
|
@ -323,6 +323,9 @@ WebAuthnController::ResumeRegister(uint64_t aTransactionId,
|
||||||
&WebAuthnController::RunResumeRegister, aTransactionId,
|
&WebAuthnController::RunResumeRegister, aTransactionId,
|
||||||
aForceNoneAttestation));
|
aForceNoneAttestation));
|
||||||
|
|
||||||
|
if (AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdownThreads)) {
|
||||||
|
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||||
|
}
|
||||||
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,6 +358,9 @@ WebAuthnController::FinishRegister(uint64_t aTransactionId,
|
||||||
if (!gWebAuthnBackgroundThread) {
|
if (!gWebAuthnBackgroundThread) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdownThreads)) {
|
||||||
|
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||||
|
}
|
||||||
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -493,6 +499,9 @@ WebAuthnController::FinishSign(
|
||||||
if (!gWebAuthnBackgroundThread) {
|
if (!gWebAuthnBackgroundThread) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdownThreads)) {
|
||||||
|
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||||
|
}
|
||||||
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -589,6 +598,9 @@ WebAuthnController::SignatureSelectionCallback(uint64_t aTransactionId,
|
||||||
if (!gWebAuthnBackgroundThread) {
|
if (!gWebAuthnBackgroundThread) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdownThreads)) {
|
||||||
|
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||||
|
}
|
||||||
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,6 +678,9 @@ WebAuthnController::PinCallback(uint64_t aTransactionId,
|
||||||
if (!gWebAuthnBackgroundThread) {
|
if (!gWebAuthnBackgroundThread) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdownThreads)) {
|
||||||
|
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||||
|
}
|
||||||
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,6 +705,9 @@ WebAuthnController::Cancel(uint64_t aTransactionId) {
|
||||||
if (!gWebAuthnBackgroundThread) {
|
if (!gWebAuthnBackgroundThread) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
if (AppShutdown::IsInOrBeyond(ShutdownPhase::XPCOMShutdownThreads)) {
|
||||||
|
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||||
|
}
|
||||||
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
return gWebAuthnBackgroundThread->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче