зеркало из https://github.com/mozilla/gecko-dev.git
Bug 727826 - Use JSON.parse instead of eval to parse JSON. r=mak
This commit is contained in:
Родитель
bb57488be4
Коммит
61d3b82ba7
|
@ -562,7 +562,7 @@ HistoryMenu.prototype = {
|
||||||
undoMenu.removeAttribute("disabled");
|
undoMenu.removeAttribute("disabled");
|
||||||
|
|
||||||
// populate menu
|
// 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++) {
|
for (var i = 0; i < undoItems.length; i++) {
|
||||||
var m = document.createElement("menuitem");
|
var m = document.createElement("menuitem");
|
||||||
m.setAttribute("label", undoItems[i].title);
|
m.setAttribute("label", undoItems[i].title);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче