Added support for NS_ALLOCATOR_CID.

This commit is contained in:
beard%netscape.com 1999-02-25 04:05:50 +00:00
Родитель bfefdb6288
Коммит ff3ef49a7f
1 изменённых файлов: 10 добавлений и 2 удалений

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

@ -18,9 +18,10 @@
*/
#include "nsXPComFactory.h"
#include "nsXPComCIID.h"
#include "nsAllocator.h"
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
static NS_DEFINE_IID(kAllocatorCID, NS_ALLOCATOR_CID);
nsresult NS_NewEventQueueServiceFactory(nsIFactory** aResult);
@ -41,8 +42,15 @@ extern "C" NS_EXPORT nsresult NSGetFactory(const nsCID& aClass, nsISupports* ser
if (aClass.Equals(kEventQueueServiceCID)) {
rv = NS_NewEventQueueServiceFactory(aFactory);
} else
if (aClass.Equals(kAllocatorCID)) {
nsIFactory* factory = new nsAllocatorFactory;
if (factory != NULL) {
factory->AddRef();
*aFactory = factory;
} else
rv = NS_ERROR_OUT_OF_MEMORY;
}
return rv;
}