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+]
git-svn-id: svn://10.0.0.236/trunk@248750 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f3cee415b9
commit
b51d323813
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user