зеркало из https://github.com/mozilla/pjs.git
removed manual registration, added autoregistration
This commit is contained in:
Родитель
ac665a5d66
Коммит
de462fd267
|
@ -44,18 +44,6 @@ PRBool bLoadAsync;
|
|||
//#include "nsIPostToServer.h"
|
||||
#include "nsINetService.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define NETLIB_DLL "netwerk.dll"
|
||||
#define XPCOM_DLL "xpcom32.dll"
|
||||
#else
|
||||
#ifdef XP_MAC
|
||||
#include "nsMacRepository.h"
|
||||
#else
|
||||
#define NETLIB_DLL "libnetwerk.so"
|
||||
#define XPCOM_DLL "libxpcom.so"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Define CIDs...
|
||||
static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID);
|
||||
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
|
@ -199,9 +187,9 @@ int main(int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kEventQueueCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
||||
result = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,
|
||||
"components");
|
||||
if (NS_FAILED(result)) return result;
|
||||
|
||||
// Create the Event Queue for this thread...
|
||||
pEventQService = nsnull;
|
||||
|
|
Загрузка…
Ссылка в новой задаче