diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-04-20 10:57:01 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-04-20 10:57:01 -0500 |
commit | 1e640f82104e57d63e268785f75914ca7d3953ce (patch) | |
tree | e4f99f2ae903bf4c99ea62a154b7d19586256b02 | |
parent | 9bf43033f3210dbd154cec9595847aae6ece0020 (diff) | |
download | aura-central-1e640f82104e57d63e268785f75914ca7d3953ce.tar.gz |
Revert "Issue %3015 - Part 2: Remove XREChildData."
This reverts commit bca6f8a4592bb03a25b8228392e5e2b58a39cc82.
-rw-r--r-- | ipc/contentproc/plugin-container.cpp | 4 | ||||
-rw-r--r-- | system/runtime/nsEmbedFunctions.cpp | 4 | ||||
-rw-r--r-- | xpcom/build/XREChildData.h | 21 | ||||
-rw-r--r-- | xpcom/build/moz.build | 1 | ||||
-rw-r--r-- | xpcom/build/nsXULAppAPI.h | 4 |
5 files changed, 31 insertions, 3 deletions
diff --git a/ipc/contentproc/plugin-container.cpp b/ipc/contentproc/plugin-container.cpp index a12b9bd8b..a85f24d34 100644 --- a/ipc/contentproc/plugin-container.cpp +++ b/ipc/contentproc/plugin-container.cpp @@ -29,6 +29,8 @@ content_process_main(int argc, char* argv[]) return 3; } + XREChildData childData; + XRE_SetProcessType(argv[--argc]); #ifdef XP_WIN @@ -40,7 +42,7 @@ content_process_main(int argc, char* argv[]) SetDllDirectoryW(L""); } #endif - nsresult rv = XRE_InitChildProcess(argc, argv); + nsresult rv = XRE_InitChildProcess(argc, argv, &childData); NS_ENSURE_SUCCESS(rv, 1); return 0; diff --git a/system/runtime/nsEmbedFunctions.cpp b/system/runtime/nsEmbedFunctions.cpp index def157cf8..9c1aca494 100644 --- a/system/runtime/nsEmbedFunctions.cpp +++ b/system/runtime/nsEmbedFunctions.cpp @@ -226,11 +226,13 @@ SetTaskbarGroupId(const nsString& aId) nsresult XRE_InitChildProcess(int aArgc, - char* aArgv[]) + char* aArgv[], + const XREChildData* aChildData) { NS_ENSURE_ARG_MIN(aArgc, 2); NS_ENSURE_ARG_POINTER(aArgv); NS_ENSURE_ARG_POINTER(aArgv[0]); + MOZ_ASSERT(aChildData); #if defined(XP_WIN) // From the --attach-console support in nsNativeAppSupportWin.cpp, but diff --git a/xpcom/build/XREChildData.h b/xpcom/build/XREChildData.h new file mode 100644 index 000000000..98a67a8e4 --- /dev/null +++ b/xpcom/build/XREChildData.h @@ -0,0 +1,21 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef XREChildData_h +#define XREChildData_h + +#include "mozilla/UniquePtr.h" + +/** + * Data needed to start a child process. + */ +struct XREChildData +{ + /** + * Used to load the GMP binary. + */ +}; + +#endif // XREChildData_h diff --git a/xpcom/build/moz.build b/xpcom/build/moz.build index a18751675..3e0752a85 100644 --- a/xpcom/build/moz.build +++ b/xpcom/build/moz.build @@ -9,6 +9,7 @@ EXPORTS += [ 'nsXPCOMCIDInternal.h', 'nsXREAppData.h', 'nsXULAppAPI.h', + 'XREChildData.h', 'xrecore.h', ] diff --git a/xpcom/build/nsXULAppAPI.h b/xpcom/build/nsXULAppAPI.h index 235837182..7efeadf40 100644 --- a/xpcom/build/nsXULAppAPI.h +++ b/xpcom/build/nsXULAppAPI.h @@ -18,6 +18,7 @@ #include "mozilla/Assertions.h" #include "mozilla/Vector.h" #include "mozilla/TimeStamp.h" +#include "XREChildData.h" /** * A directory service key which provides the platform-correct "application @@ -422,7 +423,8 @@ XRE_API(void, XRE_API(nsresult, XRE_InitChildProcess, (int aArgc, - char* aArgv[])) + char* aArgv[], + const XREChildData* aChildData)) XRE_API(GeckoProcessType, XRE_GetProcessType, ()) |