Bug 727826 - Use JSON.parse instead of eval to parse JSON. r=mak

This commit is contained in:
OHZEKI Tetsuharu 2012-02-20 23:29:20 -05:00
parent bb57488be4
commit 61d3b82ba7

View File

@ -562,7 +562,7 @@ HistoryMenu.prototype = {
undoMenu.removeAttribute("disabled");
// populate menu
var undoItems = eval("(" + this._ss.getClosedTabData(window) + ")");
var undoItems = JSON.parse(this._ss.getClosedTabData(window));
for (var i = 0; i < undoItems.length; i++) {
var m = document.createElement("menuitem");
m.setAttribute("label", undoItems[i].title);