This commit is contained in:
dougt%netscape.com 2002-09-23 21:46:25 +00:00
parent 08cedcbba7
commit 1fc52e1325
2 changed files with 11 additions and 0 deletions

View File

@ -60,6 +60,7 @@
#include "nsExceptionService.h"
#include "nsComponentManager.h"
#include "nsCategoryManagerUtils.h"
#include "nsIServiceManager.h"
#include "nsGenericFactory.h"
@ -579,6 +580,11 @@ nsresult NS_COM NS_InitXPCOM2(nsIServiceManager* *result,
rv = eventQService->CreateThreadEventQueue();
if ( NS_FAILED(rv) ) return rv;
// Notify observers of xpcom autoregistration start
NS_CreateServicesFromCategory(NS_XPCOM_STARTUP_OBSERVER_ID,
nsnull,
NS_XPCOM_STARTUP_OBSERVER_ID);
return rv;
}

View File

@ -94,8 +94,13 @@ interface nsIServiceManager : nsISupports
#define NS_ERROR_SERVICE_NOT_FOUND NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 22)
#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.
#define NS_XPCOM_STARTUP_OBSERVER_ID "xpcom-startup"
// Observing xpcom shutdown
#define NS_XPCOM_SHUTDOWN_OBSERVER_ID "xpcom-shutdown"
// Observing xpcom autoregistration. Topics will be 'start' and 'stop'.
#define NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID "xpcom-autoregistration"
#ifndef MOZILLA_STRICT_API