[tbb-commits] [tor-browser] 02/03: Bug 1770137 - Part 2, r=Gijs
gitolite role
git at cupani.torproject.org
Fri May 20 17:27:40 UTC 2022
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-96.0.3-11.0-1
in repository tor-browser.
commit c99d40a2679939a413c90ea91698af6f8dc0b5fa
Author: Nika Layzell <nika at thelayzells.com>
AuthorDate: Thu May 19 21:51:15 2022 +0000
Bug 1770137 - Part 2, r=Gijs
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.
More information about the tbb-commits
mailing list