зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1899292 - Call EnsureReadCompleted before computing permission type index. r=permissions-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D211854
This commit is contained in:
Родитель
83c1f27889
Коммит
c455cf46f1
|
@ -2195,6 +2195,10 @@ NS_IMETHODIMP
|
||||||
PermissionManager::RemoveByType(const nsACString& aType) {
|
PermissionManager::RemoveByType(const nsACString& aType) {
|
||||||
ENSURE_NOT_CHILD_PROCESS;
|
ENSURE_NOT_CHILD_PROCESS;
|
||||||
|
|
||||||
|
// Need to make sure read is done before we get the type index. Type indexes
|
||||||
|
// are populated from DB.
|
||||||
|
EnsureReadCompleted();
|
||||||
|
|
||||||
int32_t typeIndex = GetTypeIndex(aType, false);
|
int32_t typeIndex = GetTypeIndex(aType, false);
|
||||||
// If type == -1, the type isn't known,
|
// If type == -1, the type isn't known,
|
||||||
// so just return NS_OK
|
// so just return NS_OK
|
||||||
|
@ -2213,6 +2217,10 @@ PermissionManager::RemoveByTypeSince(const nsACString& aType,
|
||||||
int64_t aModificationTime) {
|
int64_t aModificationTime) {
|
||||||
ENSURE_NOT_CHILD_PROCESS;
|
ENSURE_NOT_CHILD_PROCESS;
|
||||||
|
|
||||||
|
// Need to make sure read is done before we get the type index. Type indexes
|
||||||
|
// are populated from DB.
|
||||||
|
EnsureReadCompleted();
|
||||||
|
|
||||||
int32_t typeIndex = GetTypeIndex(aType, false);
|
int32_t typeIndex = GetTypeIndex(aType, false);
|
||||||
// If type == -1, the type isn't known,
|
// If type == -1, the type isn't known,
|
||||||
// so just return NS_OK
|
// so just return NS_OK
|
||||||
|
|
Загрузка…
Ссылка в новой задаче