Bug 1358372: Part 1 - Move Windows content process AudioSession init before sandbox lowering r=jimm

Something about setting the grouping parameter was harmed by the sandbox.
This commit is contained in:
David Parks 2018-01-10 14:07:56 -08:00
Родитель 00db3443a3
Коммит f4e4ea9b59
1 изменённых файлов: 11 добавлений и 10 удалений

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

@ -2382,6 +2382,17 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority,
}
}
#if defined(XP_WIN)
// Send the info needed to join the browser process's audio session.
nsID id;
nsString sessionName;
nsString iconPath;
if (NS_SUCCEEDED(mozilla::widget::GetAudioSessionData(id, sessionName,
iconPath))) {
Unused << SendSetAudioSessionData(id, sessionName, iconPath);
}
#endif
#ifdef MOZ_CONTENT_SANDBOX
bool shouldSandbox = true;
MaybeFileDesc brokerFd = void_t();
@ -2413,16 +2424,6 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority,
KillHard("SandboxInitFailed");
}
#endif
#if defined(XP_WIN)
// Send the info needed to join the browser process's audio session.
nsID id;
nsString sessionName;
nsString iconPath;
if (NS_SUCCEEDED(mozilla::widget::GetAudioSessionData(id, sessionName,
iconPath))) {
Unused << SendSetAudioSessionData(id, sessionName, iconPath);
}
#endif
{
RefPtr<ServiceWorkerRegistrar> swr = ServiceWorkerRegistrar::Get();