Skip to content

Commit

Permalink
completely remove use of eval()
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaier committed May 4, 2010
1 parent e0db859 commit c345603
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion chrome/content/prefpane.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ var acPlugins = {
this._list.removeChild(this._list.firstChild);
}

let p = eval(this._pref.value);
let p = [];
try {
p = this._plugins.nsJSON.decode(this._pref.value);
}
catch (ex) { /* no op */ }

if (!(p instanceof Array)) {
p = [];
}
Expand Down

0 comments on commit c345603

Please sign in to comment.