Bug 1233350 - Fix TypeError in notifications.getAll(). r=kmag

This also adds some tests for the method.
This commit is contained in:
Sami Jaktholm
2015-12-22 11:29:22 +02:00
parent e28e7bc3f9
commit aa330823f9
2 changed files with 69 additions and 1 deletions

View File

@@ -124,7 +124,7 @@ extensions.registerPrivilegedAPI("notifications", (extension, context) => {
getAll: function(callback) {
let notifications = notificationsMap.get(extension);
notifications = notifications.map(notification => notification.id);
notifications = Array.from(notifications, notification => notification.id);
runSafe(context, callback, notifications);
},