зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1331656 Make ServiceWorkerManager handle PBackground init failure. r=baku
This commit is contained in:
Родитель
824e61781e
Коммит
8f32455085
|
@ -235,8 +235,6 @@ ServiceWorkerManager::ServiceWorkerManager()
|
|||
: mActor(nullptr)
|
||||
, mShuttingDown(false)
|
||||
{
|
||||
// Register this component to PBackground.
|
||||
MOZ_ALWAYS_TRUE(BackgroundChild::GetOrCreateForCurrentThread(this));
|
||||
}
|
||||
|
||||
ServiceWorkerManager::~ServiceWorkerManager()
|
||||
|
@ -273,6 +271,12 @@ ServiceWorkerManager::Init(ServiceWorkerRegistrar* aRegistrar)
|
|||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
}
|
||||
}
|
||||
|
||||
if (!BackgroundChild::GetOrCreateForCurrentThread(this)) {
|
||||
// Make sure to do this last as our failure cleanup expects Init() to have
|
||||
// executed.
|
||||
ActorFailed();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче