зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1228932 - Create Quota background actor directly if PBackgroundChild exists; r=khuey
This commit is contained in:
Родитель
cb705a63a6
Коммит
b3c22dc9ac
|
@ -333,12 +333,15 @@ QuotaManagerService::InitiateRequest(nsAutoPtr<PendingRequestInfo>& aInfo)
|
|||
}
|
||||
|
||||
if (!mBackgroundActor && mPendingRequests.IsEmpty()) {
|
||||
// We need to start the sequence to create a background actor for this
|
||||
// thread.
|
||||
|
||||
RefPtr<BackgroundCreateCallback> cb = new BackgroundCreateCallback(this);
|
||||
if (NS_WARN_IF(!BackgroundChild::GetOrCreateForCurrentThread(cb))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
if (PBackgroundChild* actor = BackgroundChild::GetForCurrentThread()) {
|
||||
BackgroundActorCreated(actor);
|
||||
} else {
|
||||
// We need to start the sequence to create a background actor for this
|
||||
// thread.
|
||||
RefPtr<BackgroundCreateCallback> cb = new BackgroundCreateCallback(this);
|
||||
if (NS_WARN_IF(!BackgroundChild::GetOrCreateForCurrentThread(cb))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче