Bug 1694248 - Don't assert if PBackground has been shut down when we try to create an RDD thread. r=bryce

This can fail if PBackground has been shut down, while the message was queued between threads.
It happens sometimes during xpcshell tests, and disabling OMTP makes it more common (but is unrelated, just changes timings).

The actual LaunchRDDProcessIfNeeded code also gracefully handles this failure mode, so not asserting shouldn't be a problem.

Depends on D106053

Differential Revision: https://phabricator.services.mozilla.com/D106824
This commit is contained in:
Matt Woodrow 2021-03-01 23:11:52 +00:00
Родитель 3e046ef549
Коммит 93058a0f5c
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -88,7 +88,8 @@ void RemoteDecoderManagerChild::Init() {
"RemoteDecoderManagerChild::InitPBackground", []() { "RemoteDecoderManagerChild::InitPBackground", []() {
ipc::PBackgroundChild* bgActor = ipc::PBackgroundChild* bgActor =
ipc::BackgroundChild::GetOrCreateForCurrentThread(); ipc::BackgroundChild::GetOrCreateForCurrentThread();
NS_ASSERTION(bgActor, "Failed to start Background channel"); NS_WARNING_ASSERTION(bgActor,
"Failed to start Background channel");
Unused << bgActor; Unused << bgActor;
})); }));