Fix Mac and Linux installer bustage caused by AutoregisterInterfaces. [b=37086, 36784]

This commit is contained in:
sgehani%netscape.com 2000-05-02 00:55:36 +00:00
Родитель f257c6c709
Коммит a523f1b457
1 изменённых файлов: 14 добавлений и 9 удалений

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

@ -101,17 +101,22 @@ PR_PUBLIC_API(nsresult) XPI_Init(
//--------------------------------------------------------------------
#ifdef XP_MAC
nsLocalFile* localFile = new nsLocalFile;
if (localFile)
nsLocalFile *binDir = new nsLocalFile;
if (binDir)
{
localFile->InitWithFSSpec(&aXPIStubDir);
rv = NS_InitXPCOM(&gServiceMgr, localFile);
binDir->InitWithFSSpec(&aXPIStubDir);
rv = NS_InitXPCOM(&gServiceMgr, binDir);
}
else
{
rv = NS_ERROR_FAILURE;
}
return NS_ERROR_FAILURE;
// binDir is contaminated now. Need compDir to pass to AutoRegister.
nsLocalFile *compDir = new nsLocalFile;
if (compDir)
compDir->InitWithFSSpec(&aXPIStubDir);
else
return NS_ERROR_FAILURE;
#elif defined(XP_PC)
char componentPath[MAX_PATH];
@ -149,7 +154,7 @@ PR_PUBLIC_API(nsresult) XPI_Init(
if (!NS_SUCCEEDED(rv))
return rv;
#ifdef XP_UNIX
#if defined(XP_UNIX) || defined(XP_MAC)
rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup,
compDir);
#else