Bug 235875 Replace NS_ERROR_SERVICE_NOT_FOUND

r=dougt
This commit is contained in:
timeless%mozdev.org 2004-02-29 08:04:46 +00:00
Родитель a705969288
Коммит 014f0b61a7
3 изменённых файлов: 14 добавлений и 11 удалений

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

@ -178,7 +178,7 @@ nsCreateInstanceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr)
getter_Copies(value));
if (NS_FAILED(rv)) goto error;
if (!value) {
rv = NS_ERROR_SERVICE_NOT_FOUND;
rv = NS_ERROR_SERVICE_NOT_AVAILABLE;
goto error;
}
NS_GetComponentManager(getter_AddRefs(compMgr));
@ -216,7 +216,7 @@ nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) con
getter_Copies(value));
if (NS_FAILED(rv)) goto error;
if (!value) {
rv = NS_ERROR_SERVICE_NOT_FOUND;
rv = NS_ERROR_SERVICE_NOT_AVAILABLE;
goto error;
}
if (mServiceManager) {
@ -2198,7 +2198,7 @@ nsComponentManagerImpl::UnregisterService(const nsCID& aClass)
}
if (!entry || !entry->mServiceObject)
return NS_ERROR_SERVICE_NOT_FOUND;
return NS_ERROR_SERVICE_NOT_AVAILABLE;
entry->mServiceObject = nsnull;
return rv;
@ -2277,7 +2277,7 @@ nsComponentManagerImpl::IsServiceInstantiated(const nsCID & aClass,
return NS_ERROR_UNEXPECTED;
}
nsresult rv = NS_ERROR_SERVICE_NOT_FOUND;
nsresult rv = NS_ERROR_SERVICE_NOT_AVAILABLE;
nsFactoryEntry* entry = nsnull;
nsFactoryTableEntry* factoryTableEntry =
NS_STATIC_CAST(nsFactoryTableEntry*,
@ -2318,7 +2318,7 @@ NS_IMETHODIMP nsComponentManagerImpl::IsServiceInstantiatedByContractID(const ch
return NS_ERROR_UNEXPECTED;
}
nsresult rv = NS_ERROR_SERVICE_NOT_FOUND;
nsresult rv = NS_ERROR_SERVICE_NOT_AVAILABLE;
nsFactoryEntry *entry = nsnull;
{
nsAutoMonitor mon(mMon);
@ -2360,7 +2360,7 @@ nsComponentManagerImpl::UnregisterService(const char* aContractID)
}
if (entry == nsnull || entry == kNonExistentContractID || entry->mServiceObject == nsnull)
return NS_ERROR_SERVICE_NOT_FOUND;
return NS_ERROR_SERVICE_NOT_AVAILABLE;
entry->mServiceObject = nsnull;
return rv;

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

@ -91,7 +91,14 @@ interface nsIServiceManager : nsISupports
%{C++
#define NS_ERROR_SERVICE_NOT_AVAILABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 22)
/**
* @status DEPRECATED
*/
#define NS_ERROR_SERVICE_NOT_FOUND NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 22)
/**
* @status DEPRECATED
*/
#define NS_ERROR_SERVICE_IN_USE NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 23)
// Observing xpcom startup. If you component has not been created, it will be.

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

@ -100,11 +100,7 @@ AsyncShutdown(int testNumber)
// code with a monitor.
err = nsServiceManager::UnregisterService(kIMyServiceCID);
if (err == NS_ERROR_SERVICE_IN_USE) {
printf("async shutdown -- service still in use\n");
return NS_OK;
}
if (err == NS_ERROR_SERVICE_NOT_FOUND) {
if (err == NS_ERROR_SERVICE_NOT_AVAILABLE) {
printf("async shutdown -- service not found\n");
return NS_OK;
}