Bug 761135 - Remove XPCOMGlueShutdown. r=benjamin
--- a/b2g/app/nsBrowserApp.cpp
+++ b/b2g/app/nsBrowserApp.cpp
@@ -244,11 +244,10 @@ int main(int argc, char* argv[])
}
int result;
{
ScopedLogging log;
result = do_main(argc, argv);
}
- XPCOMGlueShutdown();
return result;
}
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -383,25 +383,19 @@ int main(int argc, char* argv[])
}
int result;
{
ScopedLogging log;
result = do_main(argc, argv, xreDirectory);
}
- XPCOMGlueShutdown();
-
-
#ifdef XP_MACOSX
// Allow writes again. While we would like to catch writes from static
// destructors to allow early exits to use _exit, we know that there is
// at least one such write that we don't control (see bug 826029). For
// now we enable writes again and early exits will have to use exit instead
// of _exit.
-
- // Currently write poisoning is only available on OS X. Since on OS X we never
- // unload XUL, it is safe to call this function after XPCOMGlueShutdown.
XRE_DisableWritePoisoning();
#endif
return result;
}
--- a/mobile/xul/app/nsBrowserApp.cpp
+++ b/mobile/xul/app/nsBrowserApp.cpp
@@ -255,11 +255,10 @@ int main(int argc, char* argv[])
}
int result;
{
ScopedLogging log;
result = do_main(argc, argv);
}
- XPCOMGlueShutdown();
return result;
}
--- a/xpcom/glue/standalone/nsXPCOMGlue.cpp
+++ b/xpcom/glue/standalone/nsXPCOMGlue.cpp
@@ -104,25 +104,16 @@ XPCOMGlueLoadDependentLibs(const char *x
"%s" XPCOM_FILE_PATH_SEPARATOR "%s",
xpcomDir, buffer);
cb(buffer2, do_preload);
}
fclose(flist);
}
-extern "C"
-nsresult XPCOMGlueShutdown()
-{
- XPCOMGlueUnload();
-
- memset(&xpcomFunctions, 0, sizeof(xpcomFunctions));
- return NS_OK;
-}
-
XPCOM_API(nsresult)
NS_InitXPCOM2(nsIServiceManager* *result,
nsIFile* binDirectory,
nsIDirectoryServiceProvider* appFileLocationProvider)
{
if (!xpcomFunctions.init)
return NS_ERROR_NOT_INITIALIZED;
return xpcomFunctions.init(result, binDirectory, appFileLocationProvider);
--- a/xpcom/glue/standalone/nsXPCOMGlue.h
+++ b/xpcom/glue/standalone/nsXPCOMGlue.h
@@ -41,16 +41,10 @@ struct nsDynamicFunctionLoad
* @throws NS_ERROR_NOT_INITIALIZED if XPCOMGlueStartup() was not called or
* if the libxul DLL was not found.
* @throws NS_ERROR_LOSS_OF_SIGNIFICANT_DATA if only some of the required
* functions were found.
*/
extern "C" NS_HIDDEN_(nsresult)
XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols);
-/**
- * Finish the XPCOM glue after it is no longer needed.
- */
-extern "C" NS_HIDDEN_(nsresult)
-XPCOMGlueShutdown();
-
#endif // XPCOM_GLUE
#endif // nsXPCOMGlue_h__
--- a/xpcom/sample/program/nsTestSample.cpp
+++ b/xpcom/sample/program/nsTestSample.cpp
@@ -100,11 +100,10 @@ main(void)
// as we should not hold references passed XPCOM Shutdown.
servMan = 0;
manager = 0;
mysample = 0;
// Shutdown XPCOM
NS_ShutdownXPCOM(nullptr);
- XPCOMGlueShutdown();
return 0;
}
--- a/xulrunner/stub/nsXULStub.cpp
+++ b/xulrunner/stub/nsXULStub.cpp
@@ -480,12 +480,10 @@ main(int argc, char **argv)
#endif
}
retval = XRE_main(argc, argv, appData, 0);
}
NS_LogTerm();
- XPCOMGlueShutdown();
-
return retval;
}