Bug 1550695 - Avoid duplicating cubeb_init in both arms of MOZ_CUBEB_REMOTING ifdef. r=achronop

Differential Revision: https://phabricator.services.mozilla.com/D32654

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matthew Gregan 2019-05-28 09:43:08 +00:00
Родитель aa9e661a42
Коммит eee1406ae2
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -460,11 +460,11 @@ cubeb* GetCubebContextUnlocked() {
"Did not initialize sbrandName, and not on the main thread?");
}
int rv = CUBEB_ERROR;
#ifdef MOZ_CUBEB_REMOTING
MOZ_LOG(gCubebLog, LogLevel::Info,
("%s: %s", PREF_CUBEB_SANDBOX, sCubebSandbox ? "true" : "false"));
int rv = CUBEB_OK;
if (sCubebSandbox) {
if (XRE_IsParentProcess()) {
// TODO: Don't use audio IPC when within the same process.
@ -490,11 +490,11 @@ cubeb* GetCubebContextUnlocked() {
rv = audioipc_client_init(&sCubebContext, sBrandName, &initParams);
} else {
#endif // MOZ_CUBEB_REMOTING
rv = cubeb_init(&sCubebContext, sBrandName, sCubebBackendName.get());
#ifdef MOZ_CUBEB_REMOTING
}
sIPCConnection = nullptr;
#else // !MOZ_CUBEB_REMOTING
int rv = cubeb_init(&sCubebContext, sBrandName, sCubebBackendName.get());
#endif // MOZ_CUBEB_REMOTING
NS_WARNING_ASSERTION(rv == CUBEB_OK, "Could not get a cubeb context.");
sCubebState =