This commit is contained in:
warren%netscape.com 1999-09-26 10:04:36 +00:00
Родитель b31a288d0d
Коммит 89b394422e
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -514,14 +514,15 @@ static nsICaseConversion * gCaseConv = 0;
NS_IMPL_ISUPPORTS(HandleCaseConversionShutdown3, kIShutdownListenerIID); NS_IMPL_ISUPPORTS(HandleCaseConversionShutdown3, kIShutdownListenerIID);
nsresult HandleCaseConversionShutdown3::OnShutdown(const nsCID& cid, nsISupports* service) { nsresult HandleCaseConversionShutdown3::OnShutdown(const nsCID& cid, nsISupports* service) {
nsresult rv = NS_OK;
if (cid.Equals(kUnicharUtilCID)) { if (cid.Equals(kUnicharUtilCID)) {
NS_ASSERTION(service == gCaseConv, "wrong service!"); NS_ASSERTION(service == gCaseConv, "wrong service!");
if(gCaseConv){ if (gCaseConv) {
gCaseConv->Release(); rv = nsServiceManager::ReleaseService(kUnicharUtilCID, gCaseConv);
gCaseConv = 0; gCaseConv = nsnull;
} }
} }
return NS_OK; return rv;
} }
@ -531,7 +532,9 @@ public:
mListener = new HandleCaseConversionShutdown3(); mListener = new HandleCaseConversionShutdown3();
if(mListener){ if(mListener){
mListener->AddRef(); mListener->AddRef();
nsServiceManager::GetService(kUnicharUtilCID, kICaseConversionIID,(nsISupports**) &gCaseConv, mListener); nsresult rv = nsServiceManager::GetService(kUnicharUtilCID, kICaseConversionIID,
(nsISupports**) &gCaseConv, mListener);
NS_ASSERTION(NS_SUCCEEDED(rv), "can't get case conversion service");
} }
} }
protected: protected: