Bug 569270 - Assertion on child process shutdown in xpcshell. r=dwitte

This commit is contained in:
Frederic Plourde 2010-06-08 07:57:47 -04:00
Родитель fb5e11f72f
Коммит 78fd071688
1 изменённых файлов: 8 добавлений и 3 удалений

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

@ -827,11 +827,16 @@ NS_IMETHODIMP nsPrefBranch::RemoveObserver(const char *aDomain, nsIObserver *aOb
#ifdef MOZ_IPC
if (XRE_GetProcessType() == GeckoProcessType_Content) {
nsresult rv;
nsresult rv = NS_OK;
mozilla::dom::ContentProcessChild *cpc =
mozilla::dom::ContentProcessChild::GetSingleton();
NS_ASSERTION(cpc, "Content Protocol is NULL!");
rv = cpc->RemoveRemotePrefObserver(nsDependentCString(aDomain), mPrefRoot, aObserver);
// In case cpc doesn't exist here, we're silently returning (instead of
// asserting), because the child process is likely to be null
// when this is called during xpcom-shutdown.
if (cpc)
rv = cpc->RemoveRemotePrefObserver(nsDependentCString(aDomain),
mPrefRoot,
aObserver);
return rv;
}
#endif