Permalink
Browse files

Bug 1134984 - getApplicationDetails() fails because of non-serializab…

…le objects. r=dhunt
  • Loading branch information...
1 parent ab080ae commit 6c0948d80eebcbb104ce7a776c65aeae634970dd @whimboo whimboo committed Feb 20, 2015
Showing with 4 additions and 8 deletions.
  1. +4 −8 mozmill/mozmill/extension/resource/driver/mozmill.js
@@ -72,21 +72,17 @@ var Application = utils.applicationName;
*/
function getAddons() {
var addons = null;
+ var keys = ["id", "isActive", "isCompatible", "name", "type", "version"];
AddonManager.getAllAddons(function (addonList) {
var tmp_list = [ ];
addonList.forEach(function (addon) {
var tmp = { };
- // We have to filter out properties of type 'function' of the addon
- // object, which will break JSON.stringify() and result in incomplete
- // addon information.
- for (var key in addon) {
- if (typeof(addon[key]) !== "function") {
- tmp[key] = addon[key];
- }
- }
+ keys.forEach(function (key) {
+ tmp[key] = addon[key];
+ });
tmp_list.push(tmp);
});

0 comments on commit 6c0948d

Please sign in to comment.