зеркало из https://github.com/mozilla/gecko-dev.git
Cleanup
This commit is contained in:
Родитель
b31a288d0d
Коммит
89b394422e
|
@ -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:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче