diff options
author | Matheus Marinho <matheus4551@hotmail.com> | 2023-08-31 12:07:34 -0300 |
---|---|---|
committer | Matheus Marinho <matheus4551@hotmail.com> | 2023-08-31 17:04:44 -0300 |
commit | c94c303447e0a183685c0aea8a54f1e90efeb68b (patch) | |
tree | c3126d2de533755bf93cc8fc4816379b33dcbebf /ipc | |
parent | 7a4b8501505e9ed433db0b5a675bc38398b74bb8 (diff) | |
download | uxp-c94c303447e0a183685c0aea8a54f1e90efeb68b.tar.gz |
Make Gecko Media Plugins optional when not building EME or WebRTC
Co-authored-by: Moonchild <moonchild@palemoon.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/app/moz.build | 14 | ||||
-rw-r--r-- | ipc/contentproc/plugin-container.cpp | 10 |
2 files changed, 17 insertions, 7 deletions
diff --git a/ipc/app/moz.build b/ipc/app/moz.build index 33f06db62b..a67e9dc66d 100644 --- a/ipc/app/moz.build +++ b/ipc/app/moz.build @@ -18,12 +18,14 @@ LOCAL_INCLUDES += [ # We link GMPLoader into plugin-container on desktop so that its code is # covered by the desktop DRM vendor's voucher. -SOURCES += [ - '../../dom/media/gmp/GMPLoader.cpp', -] -USE_LIBS += [ - 'rlz', -] +if CONFIG['MOZ_GMP']: + SOURCES += [ + '../../dom/media/gmp/GMPLoader.cpp', + ] + + USE_LIBS += [ + 'rlz', + ] # DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional if CONFIG['OS_ARCH'] == 'WINNT': diff --git a/ipc/contentproc/plugin-container.cpp b/ipc/contentproc/plugin-container.cpp index 4cad1f2d84..5e5f6d8fbb 100644 --- a/ipc/contentproc/plugin-container.cpp +++ b/ipc/contentproc/plugin-container.cpp @@ -19,6 +19,7 @@ #include <unistd.h> #endif +#ifdef MOZ_GMP #include "GMPLoader.h" mozilla::gmp::SandboxStarter* @@ -26,6 +27,7 @@ MakeSandboxStarter() { return nullptr; } +#endif int content_process_main(int argc, char* argv[]) @@ -36,7 +38,9 @@ content_process_main(int argc, char* argv[]) return 3; } +#ifdef MOZ_GMP XREChildData childData; +#endif XRE_SetProcessType(argv[--argc]); @@ -50,15 +54,19 @@ content_process_main(int argc, char* argv[]) } #endif #ifdef MOZ_PLUGIN_CONTAINER +#ifdef MOZ_GMP // On desktop, the GMPLoader lives in plugin-container, so that its // code can be covered by an EME/GMP vendor's voucher. nsAutoPtr<mozilla::gmp::SandboxStarter> starter(MakeSandboxStarter()); if (XRE_GetProcessType() == GeckoProcessType_GMPlugin) { childData.gmpLoader = mozilla::gmp::CreateGMPLoader(starter); } -#endif nsresult rv = XRE_InitChildProcess(argc, argv, &childData); +#else + nsresult rv = XRE_InitChildProcess(argc, argv); +#endif NS_ENSURE_SUCCESS(rv, 1); +#endif return 0; } |