diff --git a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp b/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp index 344cd27d21b..32ce9ab1d27 100644 --- a/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp +++ b/mozilla/webshell/tests/viewer/nsSetupRegistry.cpp @@ -274,7 +274,7 @@ NS_SetupRegistry() { // Autoregistration happens here. The rest of RegisterComponent() calls should happen // only for dlls not in the components directory. -#if defined(XP_UNIX) || defined(XP_PC) + // Create exeDir/"components" nsSpecialSystemDirectory sysdir(nsSpecialSystemDirectory::OS_CurrentProcessDirectory); sysdir += "components"; @@ -289,11 +289,15 @@ NS_SetupRegistry() */ #endif /* XP_PC */ printf("nsComponentManager: Using components dir: %s\n", componentsDir); + +#ifdef XP_MAC + nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, nsnull); +#else nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, componentsDir); +#endif /* XP_MAC */ // XXX Look for user specific components // XXX UNIX: ~/.mozilla/components } -#endif nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponent(kAllocatorCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE); diff --git a/mozilla/xpcom/components/nsComponentManager.cpp b/mozilla/xpcom/components/nsComponentManager.cpp index 9b1e7b617f1..fc9e56c698d 100644 --- a/mozilla/xpcom/components/nsComponentManager.cpp +++ b/mozilla/xpcom/components/nsComponentManager.cpp @@ -223,12 +223,6 @@ nsresult nsComponentManagerImpl::Init(void) PlatformVersionCheck(); #endif -#if !defined(XP_UNIX) && !defined(XP_PC) - // The below code is being moved out into the applications using using - // nsSpecialSystemDirectory platform by platform. - AutoRegister(NS_Startup, NULL); -#endif /* !XP_UNIX */ - return NS_OK; } diff --git a/mozilla/xpcom/src/nsComponentManager.cpp b/mozilla/xpcom/src/nsComponentManager.cpp index 9b1e7b617f1..fc9e56c698d 100644 --- a/mozilla/xpcom/src/nsComponentManager.cpp +++ b/mozilla/xpcom/src/nsComponentManager.cpp @@ -223,12 +223,6 @@ nsresult nsComponentManagerImpl::Init(void) PlatformVersionCheck(); #endif -#if !defined(XP_UNIX) && !defined(XP_PC) - // The below code is being moved out into the applications using using - // nsSpecialSystemDirectory platform by platform. - AutoRegister(NS_Startup, NULL); -#endif /* !XP_UNIX */ - return NS_OK; }