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
Родитель bb57488be4
Коммит 61d3b82ba7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);