зеркало из https://github.com/mozilla/gecko-dev.git
Bug 812641: Shut down SipCC instance when number of PeerConnections == 0 (reland) r=ehugg
This commit is contained in:
Родитель
436fc9b0fa
Коммит
67fb41348c
|
@ -278,8 +278,14 @@ PeerConnectionImpl::PeerConnectionImpl()
|
|||
|
||||
PeerConnectionImpl::~PeerConnectionImpl()
|
||||
{
|
||||
peerconnections.erase(mHandle);
|
||||
Close();
|
||||
// Since this and Initialize() occur on MainThread, they can't both be
|
||||
// running at once
|
||||
// Might be more optimal to release off a timer (and XPCOM Shutdown)
|
||||
// to avoid churn
|
||||
peerconnections.erase(mHandle);
|
||||
if (peerconnections.empty())
|
||||
Shutdown();
|
||||
|
||||
/* We should release mPCObserver on the main thread, but also prevent a double free.
|
||||
nsCOMPtr<nsIThread> mainThread;
|
||||
|
|
Загрузка…
Ссылка в новой задаче