Bug 1534878 - xpcom: Remove unused function NS_InitXPCOM(). r=froydnj
authorChris Peterson <cpeterson@mozilla.com>
Sun, 24 Feb 2019 16:48:33 -0800
changeset 525375 ecf117f6a9b78d9c0f918107b0ea9dc9d9d3dd1e
parent 525374 710481a0ddfa6826b5d06e93d683547f4da97402
child 525376 124ee436c4214fbb5c770c87054a7484c31772f5
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1534878, 46320
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1534878 - xpcom: Remove unused function NS_InitXPCOM(). r=froydnj NS_InitXPCOM() is currently not called in Gecko. It has been a one-line wrapper around NS_InitXPCOM2() since the year 2000 (bug 46320), presumably to maintain ABI compatibility for third-party users of XPCOM. We no longer need to worry about XPCOM ABI compatibility. https://searchfox.org/mozilla-central/commit/cddb62593d786e0ff12b25037c74b01cb1a802e5 clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called). xpcom/build/XPCOMInit.cpp:187:1 [-Wmissing-prototypes] no previous prototype for function 'NS_InitXPCOM' Differential Revision: https://phabricator.services.mozilla.com/D23266
xpcom/build/XPCOMInit.cpp
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -198,21 +198,16 @@ NSMODULE_DEFN(Dummy8) = &kDummy8;
 // gDebug will be freed during shutdown.
 static nsIDebug2* gDebug = nullptr;
 
 EXPORT_XPCOM_API(nsresult)
 NS_GetDebug(nsIDebug2** aResult) {
   return nsDebugImpl::Create(nullptr, NS_GET_IID(nsIDebug2), (void**)aResult);
 }
 
-EXPORT_XPCOM_API(nsresult)
-NS_InitXPCOM(nsIServiceManager** aResult, nsIFile* aBinDirectory) {
-  return NS_InitXPCOM2(aResult, aBinDirectory, nullptr);
-}
-
 class ICUReporter final : public nsIMemoryReporter,
                           public CountingAllocatorBase<ICUReporter> {
  public:
   NS_DECL_ISUPPORTS
 
   static void* Alloc(const void*, size_t aSize) {
     return CountingMalloc(aSize);
   }