Skip to content
This repository was archived by the owner on Aug 20, 2018. It is now read-only.

Commit 6c0948d

Browse files
committed
Bug 1134984 - getApplicationDetails() fails because of non-serializable objects. r=dhunt
1 parent ab080ae commit 6c0948d

File tree

1 file changed

+4
-8
lines changed
  • mozmill/mozmill/extension/resource/driver

1 file changed

+4
-8
lines changed

mozmill/mozmill/extension/resource/driver/mozmill.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,17 @@ var Application = utils.applicationName;
7272
*/
7373
function getAddons() {
7474
var addons = null;
75+
var keys = ["id", "isActive", "isCompatible", "name", "type", "version"];
7576

7677
AddonManager.getAllAddons(function (addonList) {
7778
var tmp_list = [ ];
7879

7980
addonList.forEach(function (addon) {
8081
var tmp = { };
8182

82-
// We have to filter out properties of type 'function' of the addon
83-
// object, which will break JSON.stringify() and result in incomplete
84-
// addon information.
85-
for (var key in addon) {
86-
if (typeof(addon[key]) !== "function") {
87-
tmp[key] = addon[key];
88-
}
89-
}
83+
keys.forEach(function (key) {
84+
tmp[key] = addon[key];
85+
});
9086

9187
tmp_list.push(tmp);
9288
});

0 commit comments

Comments
 (0)