Bug 422591 - "nsNotifyAddrListener shuts down its worker thread in response to the wrong observer topic" [p=honzab@allpeers.com (Honza Bambas [mayhemer]) r=biesi a=blocking1.9+]

This commit is contained in:
reed@reedloden.com 2008-03-28 01:35:28 -07:00
Родитель 0209e9b4d2
Коммит a1c11a684e
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -177,7 +177,7 @@ nsNotifyAddrListener::Observe(nsISupports *subject,
const char *topic,
const PRUnichar *data)
{
if (!strcmp(NS_XPCOM_SHUTDOWN_OBSERVER_ID, topic))
if (!strcmp("xpcom-shutdown-threads", topic))
Shutdown();
return NS_OK;
@ -203,7 +203,7 @@ nsNotifyAddrListener::Init(void)
do_GetService("@mozilla.org/observer-service;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID,
rv = observerService->AddObserver(this, "xpcom-shutdown-threads",
PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
@ -223,7 +223,7 @@ nsNotifyAddrListener::Shutdown(void)
nsCOMPtr<nsIObserverService> observerService =
do_GetService("@mozilla.org/observer-service;1");
if (observerService)
observerService->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
observerService->RemoveObserver(this, "xpcom-shutdown-threads");
if (!mShutdownEvent)
return NS_OK;