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 e89fa5db618f806fdfe0accba1072e140a6b6f11 Author: Peter Van der Beken peterv@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,