mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
170369 - autoload xpcom components. r=dveditz@netscape.com, sr=rpotts@netscape.com
This commit is contained in:
parent
08cedcbba7
commit
1fc52e1325
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user