зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1050509: Shut down the KeyStore socket during system shutdown to avoid leaks. r=tdz
This commit is contained in:
Родитель
a874f0a039
Коммит
04c06effe3
|
@ -129,6 +129,11 @@ SystemWorkerManager::Shutdown()
|
|||
}
|
||||
mWifiWorker = nullptr;
|
||||
|
||||
if (mKeyStore) {
|
||||
mKeyStore->CloseSocket();
|
||||
mKeyStore = nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
if (obs) {
|
||||
obs->RemoveObserver(this, WORKERS_SHUTDOWN_TOPIC);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set sw=4 ts=8 et ft=cpp: */
|
||||
/* 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
|
||||
|
@ -359,10 +359,16 @@ KeyStoreConnector::GetSocketAddr(const sockaddr_any& aAddr,
|
|||
|
||||
KeyStore::KeyStore()
|
||||
{
|
||||
MOZ_COUNT_CTOR(KeyStore);
|
||||
::startKeyStoreService();
|
||||
Listen();
|
||||
}
|
||||
|
||||
KeyStore::~KeyStore()
|
||||
{
|
||||
MOZ_COUNT_DTOR(KeyStore);
|
||||
}
|
||||
|
||||
void
|
||||
KeyStore::Shutdown()
|
||||
{
|
||||
|
|
|
@ -98,11 +98,12 @@ class KeyStore : public mozilla::ipc::UnixSocketConsumer
|
|||
{
|
||||
public:
|
||||
KeyStore();
|
||||
virtual ~KeyStore() {}
|
||||
|
||||
void Shutdown();
|
||||
|
||||
private:
|
||||
virtual ~KeyStore();
|
||||
|
||||
virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage);
|
||||
|
||||
virtual void OnConnectSuccess();
|
||||
|
|
Загрузка…
Ссылка в новой задаче