[tbb-commits] [tor-browser] 01/85: Bug 1770137 - Make notification code use Object.create. r=Gijs, freddyb, a=dsmith
gitolite role
git at cupani.torproject.org
Fri Jun 10 17:00:52 UTC 2022
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch tor-browser-91.9.0esr-11.5-2
in repository tor-browser.
commit c328863e7762160b6bd773f79a71a81837bff91f
Author: Peter Van der Beken <peterv at propagandism.org>
AuthorDate: Thu May 19 14:31:53 2022 +0000
Bug 1770137 - Make notification code use Object.create. r=Gijs,freddyb,a=dsmith
Differential Revision: https://phabricator.services.mozilla.com/D146798
---
dom/notification/old/NotificationDB.jsm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dom/notification/old/NotificationDB.jsm b/dom/notification/old/NotificationDB.jsm
index e950404f500b7..eb27b6782ff7a 100644
--- a/dom/notification/old/NotificationDB.jsm
+++ b/dom/notification/old/NotificationDB.jsm
@@ -40,8 +40,8 @@ var NotificationDB = {
return;
}
- this.notifications = {};
- this.byTag = {};
+ this.notifications = Object.create(null);
+ this.byTag = Object.create(null);
this.loaded = false;
this.tasks = []; // read/write operation queue
@@ -111,7 +111,7 @@ var NotificationDB = {
// populate the list of notifications by tag
if (this.notifications) {
for (var origin in this.notifications) {
- this.byTag[origin] = {};
+ this.byTag[origin] = Object.create(null);
for (var id in this.notifications[origin]) {
var curNotification = this.notifications[origin][id];
if (curNotification.tag) {
@@ -344,8 +344,8 @@ var NotificationDB = {
var origin = data.origin;
var notification = data.notification;
if (!this.notifications[origin]) {
- this.notifications[origin] = {};
- this.byTag[origin] = {};
+ this.notifications[origin] = Object.create(null);
+ this.byTag[origin] = Object.create(null);
}
// We might have existing notification with this tag,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list