mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1591877
- Forbid creation of PBackgroundLSRequest/PBackgroundLSSimpleRequest actors in the parent process if LSNG is not enabled; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D119710
This commit is contained in:
parent
1fbcf183f9
commit
ed1318cf0a
@ -3282,6 +3282,10 @@ PBackgroundLSRequestParent* AllocPBackgroundLSRequestParent(
|
|||||||
AssertIsOnBackgroundThread();
|
AssertIsOnBackgroundThread();
|
||||||
MOZ_ASSERT(aParams.type() != LSRequestParams::T__None);
|
MOZ_ASSERT(aParams.type() != LSRequestParams::T__None);
|
||||||
|
|
||||||
|
if (NS_WARN_IF(!NextGenLocalStorageEnabled())) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (NS_WARN_IF(QuotaClient::IsShuttingDownOnBackgroundThread())) {
|
if (NS_WARN_IF(QuotaClient::IsShuttingDownOnBackgroundThread())) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -3334,6 +3338,7 @@ bool RecvPBackgroundLSRequestConstructor(PBackgroundLSRequestParent* aActor,
|
|||||||
AssertIsOnBackgroundThread();
|
AssertIsOnBackgroundThread();
|
||||||
MOZ_ASSERT(aActor);
|
MOZ_ASSERT(aActor);
|
||||||
MOZ_ASSERT(aParams.type() != LSRequestParams::T__None);
|
MOZ_ASSERT(aParams.type() != LSRequestParams::T__None);
|
||||||
|
MOZ_ASSERT(NextGenLocalStorageEnabled());
|
||||||
MOZ_ASSERT(!QuotaClient::IsShuttingDownOnBackgroundThread());
|
MOZ_ASSERT(!QuotaClient::IsShuttingDownOnBackgroundThread());
|
||||||
|
|
||||||
// The actor is now completely built.
|
// The actor is now completely built.
|
||||||
@ -3360,6 +3365,10 @@ PBackgroundLSSimpleRequestParent* AllocPBackgroundLSSimpleRequestParent(
|
|||||||
AssertIsOnBackgroundThread();
|
AssertIsOnBackgroundThread();
|
||||||
MOZ_ASSERT(aParams.type() != LSSimpleRequestParams::T__None);
|
MOZ_ASSERT(aParams.type() != LSSimpleRequestParams::T__None);
|
||||||
|
|
||||||
|
if (NS_WARN_IF(!NextGenLocalStorageEnabled())) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (NS_WARN_IF(QuotaClient::IsShuttingDownOnBackgroundThread())) {
|
if (NS_WARN_IF(QuotaClient::IsShuttingDownOnBackgroundThread())) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -3397,6 +3406,7 @@ bool RecvPBackgroundLSSimpleRequestConstructor(
|
|||||||
AssertIsOnBackgroundThread();
|
AssertIsOnBackgroundThread();
|
||||||
MOZ_ASSERT(aActor);
|
MOZ_ASSERT(aActor);
|
||||||
MOZ_ASSERT(aParams.type() != LSSimpleRequestParams::T__None);
|
MOZ_ASSERT(aParams.type() != LSSimpleRequestParams::T__None);
|
||||||
|
MOZ_ASSERT(NextGenLocalStorageEnabled());
|
||||||
MOZ_ASSERT(!QuotaClient::IsShuttingDownOnBackgroundThread());
|
MOZ_ASSERT(!QuotaClient::IsShuttingDownOnBackgroundThread());
|
||||||
|
|
||||||
// The actor is now completely built.
|
// The actor is now completely built.
|
||||||
|
Loading…
Reference in New Issue
Block a user