mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
1d2e8ed150
Summary: This patch fixes the reported leak of U2FTransactionChild instances in the content process by introducing a WebAuthnTransactionChildBase class that both WebAuthnTransactionChild and U2FTransactionChild inherit from. This base class is responsible for proper refcounting. In BackgroundChildImpl::DeallocPWebAuthnTransactionChild() we currently always cast to WebAuthnTransactionChild, that will work only for the WebAuthn API. We can now cast to WebAuthnTransactionChildBase to make this work for U2F as well. Reviewers: jcj Reviewed By: jcj Bug #: 1412408 Differential Revision: https://phabricator.services.mozilla.com/D179
22 lines
705 B
C++
22 lines
705 B
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "mozilla/dom/WebAuthnTransactionChildBase.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
WebAuthnTransactionChildBase::WebAuthnTransactionChildBase()
|
|
{
|
|
// Retain a reference so the task object isn't deleted without IPDL's
|
|
// knowledge. The reference will be released by
|
|
// mozilla::ipc::BackgroundChildImpl::DeallocPWebAuthnTransactionChild.
|
|
NS_ADDREF_THIS();
|
|
}
|
|
|
|
}
|
|
}
|