зеркало из https://github.com/mozilla/gecko-dev.git
bug 1524478 - don't create JS objects from WebAuthnManager or U2F destructors r=qdot
Before this patch, the WebAuthnManager/U2F destructors would call MaybeReject on existing transaction promises. Doing this leaks JS objects. If WebAuthnManager/U2F are being destructed, though, the window is going away, so it shouldn't be necessary to reject any outstanding promises. This patch just clears the transactions. Differential Revision: https://phabricator.services.mozilla.com/D27346 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
abbca7fd7d
Коммит
7c34defd31
|
@ -140,7 +140,7 @@ U2F::~U2F() {
|
|||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (mTransaction.isSome()) {
|
||||
RejectTransaction(NS_ERROR_ABORT);
|
||||
ClearTransaction();
|
||||
}
|
||||
|
||||
if (mChild) {
|
||||
|
|
|
@ -200,7 +200,7 @@ WebAuthnManager::~WebAuthnManager() {
|
|||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (mTransaction.isSome()) {
|
||||
RejectTransaction(NS_ERROR_ABORT);
|
||||
ClearTransaction();
|
||||
}
|
||||
|
||||
if (mChild) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче