Bug 1313634 - Fix undefined variables issues in cookies.js that lead to the cookies window not updating properly when open. r=jaws

MozReview-Commit-ID: RBhuCbjrYT
This commit is contained in:
Mark Banner
2016-10-28 12:16:36 +01:00
parent a15f882a5c
commit 66092fae61

View File

@@ -127,10 +127,10 @@ var gCookiesWindow = {
var rowIndex = 0; var rowIndex = 0;
var cookieItem = null; var cookieItem = null;
if (!this._view._filtered) { if (!this._view._filtered) {
for (let host of this._hostsOrder) { // (var host in this._hosts) { for (let host of this._hostOrder) {
++rowIndex; ++rowIndex;
var hostItem = this._hosts[host]; var hostItem = this._hosts[host];
if (this._hostOrder[i] == strippedHost) { // host == strippedHost) { if (host == strippedHost) {
// Host matches, look for the cookie within this Host collection // Host matches, look for the cookie within this Host collection
// and update its data // and update its data
for (let currCookie of hostItem.cookies) { for (let currCookie of hostItem.cookies) {
@@ -888,7 +888,7 @@ var gCookiesWindow = {
// Save open states // Save open states
this._openIndices = []; this._openIndices = [];
for (i = 0; i < this._view.rowCount; ++i) { for (let i = 0; i < this._view.rowCount; ++i) {
var item = this._view._getItemAtIndex(i); var item = this._view._getItemAtIndex(i);
if (item && item.container && item.open) if (item && item.container && item.open)
this._openIndices.push(i); this._openIndices.push(i);