Bug 708935 - Make the DNS listener proxies release the nsIDNSListener on the main thread, to solve last-release issues and ASSERTION: ASSERTION: nsStandardURL not thread-safe from PendingPACQuery, r=mcmanus

--HG--
extra : rebase_source : 6b66b58398a7e671fff19044848ed497cd019dd5
This commit is contained in:
Benjamin Smedberg 2011-12-30 12:53:44 -05:00
Родитель f56195c7a3
Коммит 2f44e0cd9b
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -43,6 +43,7 @@
#include "nsIPrefBranch.h"
#include "nsIPrefBranch2.h"
#include "nsIServiceManager.h"
#include "nsProxyRelease.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsAutoPtr.h"
@ -485,6 +486,12 @@ public:
, mTargetThread(aTargetThread)
{ }
~DNSListenerProxy()
{
nsCOMPtr<nsIThread> mainThread(do_GetMainThread());
NS_ProxyRelease(mainThread, mListener);
}
NS_DECL_ISUPPORTS
NS_DECL_NSIDNSLISTENER
@ -501,6 +508,12 @@ public:
, mStatus(aStatus)
{ }
~OnLookupCompleteRunnable()
{
nsCOMPtr<nsIThread> mainThread(do_GetMainThread());
NS_ProxyRelease(mainThread, mListener);
}
NS_DECL_NSIRUNNABLE
private: