From b5348a3322694018c1b7589ceeecbbbf015669a7 Mon Sep 17 00:00:00 2001 From: Ben Turner Date: Tue, 25 Aug 2009 16:39:30 -0700 Subject: [PATCH] Fix build bustage --- dom/ipc/ContentProcessChild.cpp | 9 ++------- toolkit/library/dlldeps-xul.cpp | 1 + toolkit/xre/nsEmbedFunctions.cpp | 12 ++++++++++++ xpcom/build/nsXULAppAPI.h | 3 +++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dom/ipc/ContentProcessChild.cpp b/dom/ipc/ContentProcessChild.cpp index 91c09285873..eb36bc54561 100644 --- a/dom/ipc/ContentProcessChild.cpp +++ b/dom/ipc/ContentProcessChild.cpp @@ -6,9 +6,7 @@ #include "mozilla/ipc/TestShellChild.h" -#include "mozilla/XPCOM.h" -#include "nsXPFEComponentsCID.h" -#include "nsIAppStartup.h" +#include "nsXULAppAPI.h" using namespace mozilla::ipc; @@ -78,10 +76,7 @@ ContentProcessChild::Quit() mIFrames.Clear(); mTestShells.Clear(); - nsCOMPtr appStartup(do_GetService(NS_APPSTARTUP_CONTRACTID)); - if (appStartup) { - appStartup->Quit(nsIAppStartup::eForceQuit); - } + XRE_ShutdownChildProcess(); } } // namespace dom diff --git a/toolkit/library/dlldeps-xul.cpp b/toolkit/library/dlldeps-xul.cpp index bd51efb10e9..693feffd7f1 100644 --- a/toolkit/library/dlldeps-xul.cpp +++ b/toolkit/library/dlldeps-xul.cpp @@ -55,4 +55,5 @@ void xxxNeverCalledXUL() XRE_InitParentProcess(0, nsnull, nsnull, nsnull); XRE_RunTestShell(0, nsnull); XRE_GetProcessType(); + XRE_ShutdownChildProcess(); } diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index 4285fbda8fc..e6e36f75586 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -42,6 +42,7 @@ #include "prenv.h" #include "nsIAppShell.h" +#include "nsIAppStartup.h" #include "nsIAppStartupNotifier.h" #include "nsIDirectoryService.h" #include "nsILocalFile.h" @@ -56,6 +57,7 @@ #include "nsString.h" #include "nsThreadUtils.h" #include "nsWidgetsCID.h" +#include "nsXPFEComponentsCID.h" #include "nsXREDirProvider.h" #ifdef MOZ_IPC @@ -496,4 +498,14 @@ XRE_RunIPCTestHarness(int aArgc, char* aArgv[]) NS_ENSURE_SUCCESS(rv, 1); return 0; } + +void +XRE_ShutdownChildProcess() +{ + nsCOMPtr appStartup(do_GetService(NS_APPSTARTUP_CONTRACTID)); + if (appStartup) { + appStartup->Quit(nsIAppStartup::eForceQuit); + } +} + #endif diff --git a/xpcom/build/nsXULAppAPI.h b/xpcom/build/nsXULAppAPI.h index eb9a1250c64..e17b5537558 100644 --- a/xpcom/build/nsXULAppAPI.h +++ b/xpcom/build/nsXULAppAPI.h @@ -473,4 +473,7 @@ XRE_API(int, XRE_RunIPCTestHarness, (int aArgc, char* aArgv[])) +XRE_API(void, + XRE_ShutdownChildProcess, ()) + #endif // _nsXULAppAPI_h__