[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 02/03: Bug 1770137 - Part 2, r=Gijs, a=dsmith
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch tor-browser-91.9.0esr-11.0-1
in repository tor-browser.
commit 5c21edce252a700b94efe8b73f0b400226647f20
Author: Nika Layzell <nika@xxxxxxxxxxxxxxx>
AuthorDate: Thu May 19 21:51:15 2022 +0000
Bug 1770137 - Part 2, r=Gijs, a=dsmith
Differential Revision: https://phabricator.services.mozilla.com/D146851
---
dom/notification/old/NotificationDB.jsm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dom/notification/old/NotificationDB.jsm b/dom/notification/old/NotificationDB.jsm
index eb27b6782ff7a..4d52c96c1aa9c 100644
--- a/dom/notification/old/NotificationDB.jsm
+++ b/dom/notification/old/NotificationDB.jsm
@@ -75,13 +75,14 @@ var NotificationDB = {
},
filterNonAppNotifications(notifications) {
+ let result = Object.create(null);
for (let origin in notifications) {
+ result[origin] = Object.create(null);
let persistentNotificationCount = 0;
for (let id in notifications[origin]) {
if (notifications[origin][id].serviceWorkerRegistrationScope) {
persistentNotificationCount++;
- } else {
- delete notifications[origin][id];
+ result[origin][id] = notifications[origin][id];
}
}
if (persistentNotificationCount == 0) {
@@ -90,11 +91,11 @@ var NotificationDB = {
"Origin " + origin + " is not linked to an app manifest, deleting."
);
}
- delete notifications[origin];
+ delete result[origin];
}
}
- return notifications;
+ return result;
},
// Attempt to read notification file, if it's not there we will create it.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits