Bug 350873: nsStreamLoader code accessed on secondary thread [ASSERTION: nsStreamLoader not thread-safe]. r=kengert, sr=dveditz, b1.9=sayrer

This commit is contained in:
dcamp@mozilla.com 2008-02-21 17:05:17 -08:00
Родитель 152c439378
Коммит 60509057ee
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -67,6 +67,7 @@
#include "nsIThread.h"
#include "nsIWindowWatcher.h"
#include "nsIPrompt.h"
#include "nsProxyRelease.h"
#include "ssl.h"
#include "cert.h"
@ -565,6 +566,11 @@ nsHTTPListener::~nsHTTPListener()
if (mLock)
PR_DestroyLock(mLock);
if (mLoader) {
nsCOMPtr<nsIThread> mainThread(do_GetMainThread());
NS_ProxyRelease(mainThread, mLoader);
}
}
NS_IMPL_THREADSAFE_ISUPPORTS1(nsHTTPListener, nsIStreamLoaderObserver)