Fix for #80778 - ASSERTION on startup: nsAppStartupNotifier.cpp

r/sr=alecf
This commit is contained in:
chak%netscape.com 2001-06-28 02:32:12 +00:00
Родитель 190b061f3f
Коммит efc3872feb
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -89,13 +89,19 @@ NS_IMETHODIMP nsAppStartupNotifier::Observe(nsISupports *aSubject, const PRUnich
else
startupObserver = do_CreateInstance(contractId, &rv);
NS_ASSERTION(NS_SUCCEEDED(rv), "cannot create startup observer!\n");
if (NS_SUCCEEDED(rv)) {
rv = startupObserver->Observe(nsnull, aTopic, nsnull);
// mainly for debugging if you want to know if your observer worked.
NS_ASSERTION(NS_SUCCEEDED(rv), "Startup Observer failed!\n");
}
else {
#ifdef NS_DEBUG
nsCAutoString warnStr("Cannot create startup observer : ");
warnStr += contractId.get();
NS_WARNING(warnStr.get());
#endif
}
}
}
}