Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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

…le objects. r=dhunt
  • Loading branch information...
whimboo committed Feb 20, 2015
1 parent ab080ae commit 6c0948d80eebcbb104ce7a776c65aeae634970dd
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.
You can’t perform that action at this time.