зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1732473 - Remove redundant privateBrowsingAllowed check r=zombie
The query method already validates whether access to private cookies is allowed. It cannot yield private cookies if not allowed, so checking it again in the loop of getAll is redundant.. Differential Revision: https://phabricator.services.mozilla.com/D127644
This commit is contained in:
Родитель
9cc497b2b4
Коммит
b364bab638
|
@ -565,12 +565,6 @@ this.cookies = class extends ExtensionAPI {
|
|||
|
||||
let allowed = ["url", "name"];
|
||||
for (let { cookie, storeId } of query(details, allowed, context)) {
|
||||
if (
|
||||
isPrivateCookieStoreId(details.storeId) &&
|
||||
!context.privateBrowsingAllowed
|
||||
) {
|
||||
return Promise.reject({ message: "Unknown storeId" });
|
||||
}
|
||||
Services.cookies.remove(
|
||||
cookie.host,
|
||||
cookie.name,
|
||||
|
|
Загрузка…
Ссылка в новой задаче