forked from mirrors/gecko-dev
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:
parent
83c1f27889
commit
c455cf46f1
1 changed files with 8 additions and 0 deletions
|
|
@ -2195,6 +2195,10 @@ NS_IMETHODIMP
|
|||
PermissionManager::RemoveByType(const nsACString& aType) {
|
||||
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);
|
||||
// If type == -1, the type isn't known,
|
||||
// so just return NS_OK
|
||||
|
|
@ -2213,6 +2217,10 @@ PermissionManager::RemoveByTypeSince(const nsACString& aType,
|
|||
int64_t aModificationTime) {
|
||||
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);
|
||||
// If type == -1, the type isn't known,
|
||||
// so just return NS_OK
|
||||
|
|
|
|||
Loading…
Reference in a new issue