diff --git a/xpfc/shell/src/nsShellInstance.cpp b/xpfc/shell/src/nsShellInstance.cpp index 30062bfc4984..fee038d1034e 100644 --- a/xpfc/shell/src/nsShellInstance.cpp +++ b/xpfc/shell/src/nsShellInstance.cpp @@ -86,6 +86,8 @@ nsShellInstance::nsShellInstance() nsShellInstance::~nsShellInstance() { + //NS_ShutdownINetService(); + NS_IF_RELEASE(mDeviceContext); NS_IF_RELEASE(mApplicationWindow); @@ -116,9 +118,9 @@ nsresult nsShellInstance::Init() mPref->Startup(nsnull); - res = NS_InitINetService(); - if (NS_OK != res) - return res; + //res = NS_InitINetService(); + //if (NS_OK != res) + // return res; // Create a Stream Manager res = nsRepository::CreateInstance(kCStreamManager, diff --git a/xpfc/shell/src/unix/main.cpp b/xpfc/shell/src/unix/main.cpp index 8711c8d9f135..cea1a320fc3a 100644 --- a/xpfc/shell/src/unix/main.cpp +++ b/xpfc/shell/src/unix/main.cpp @@ -34,7 +34,6 @@ #define XPFC_DLL "libxpfc10.so" extern "C" char *fe_GetConfigDir(void) { - printf("XXX: return /tmp for fe_GetConfigDir\n"); return strdup("/tmp"); } @@ -78,6 +77,8 @@ void main(int argc, char **argv) nsIShellInstance * pShellInstance ; nsIApplicationShell * pApplicationShell ; + PL_InitializeEventsLib(""); + XtSetLanguageProc(NULL, NULL, NULL); topLevel = XtVaAppInitialize(&app_context, "Shell", NULL, 0, &argc, argv, NULL, NULL); @@ -86,6 +87,7 @@ void main(int argc, char **argv) PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); PR_STDIO_INIT(); + // Let get a ShellInstance for this Application instance nsRepository::RegisterFactory(kCShellInstanceCID, XPFC_DLL, PR_FALSE, PR_FALSE); @@ -157,8 +159,7 @@ void main(int argc, char **argv) // We're done, clean up nsApplicationManager::DeleteShellAssociation(pApplicationShell, pShellInstance); - NS_ShutdownINetService(); - PR_Cleanup(); + //PR_Cleanup(); // book out of here return ; diff --git a/xpfc/shell/src/windows/winmain.cpp b/xpfc/shell/src/windows/winmain.cpp index bba14cc02bb8..5badcb4518a6 100644 --- a/xpfc/shell/src/windows/winmain.cpp +++ b/xpfc/shell/src/windows/winmain.cpp @@ -72,10 +72,12 @@ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, nsIShellInstance * pShellInstance ; nsIApplicationShell * pApplicationShell ; - PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); - PR_STDIO_INIT(); + PL_InitializeEventsLib(""); - PL_InitializeEventsLib(""); + PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); + PR_STDIO_INIT(); + + // Let get a ShellInstance for this Application instance @@ -148,8 +150,7 @@ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, NS_RELEASE(pApplicationShell); NS_RELEASE(pShellInstance); - - NS_ShutdownINetService(); + //PR_Cleanup(); // book out of here