Bug 1924095 - Don't regenerate backups when cookies are removed by the site. r=backup-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D227865
This commit is contained in:
@@ -3326,9 +3326,14 @@ export class BackupService extends EventTarget {
|
||||
// Intentional fall-through
|
||||
case "session-cookie-changed": {
|
||||
let notification = subject.QueryInterface(Ci.nsICookieNotification);
|
||||
// A browsingContextId value of 0 means that this deletion was caused by
|
||||
// chrome UI cookie deletion, which is what we care about. If it's not
|
||||
// 0, then a site deleted its own cookie, which we ignore.
|
||||
if (
|
||||
notification.action == Ci.nsICookieNotification.COOKIE_DELETED ||
|
||||
notification.action == Ci.nsICookieNotification.ALL_COOKIES_CLEARED
|
||||
(notification.action == Ci.nsICookieNotification.COOKIE_DELETED ||
|
||||
notification.action ==
|
||||
Ci.nsICookieNotification.ALL_COOKIES_CLEARED) &&
|
||||
!notification.browsingContextId
|
||||
) {
|
||||
this.#debounceRegeneration();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user