Bug 689593 Change users of Array.prototype.splice to not rely on non-standard behavior of deleting all elements from |k| onward for |arr.splice(k)|. r=Neil
This commit is contained in:
Родитель
1e48d2d483
Коммит
72c91354e3
|
@ -76,7 +76,7 @@ var PlacesOrganizer = {
|
|||
|
||||
this.selectLeftPaneQuery(leftPaneSelection);
|
||||
// clear the back-stack
|
||||
this._backHistory.splice(0);
|
||||
this._backHistory.splice(0, this._backHistory.length);
|
||||
document.getElementById("OrganizerCommand:Back").setAttribute("disabled", true);
|
||||
|
||||
var view = this._content.treeBoxObject.view;
|
||||
|
@ -137,7 +137,7 @@ var PlacesOrganizer = {
|
|||
|
||||
if (this.location) {
|
||||
this._backHistory.unshift(this.location);
|
||||
this._forwardHistory.splice(0);
|
||||
this._forwardHistory.splice(0, this._forwardHistory.length);
|
||||
}
|
||||
|
||||
this._location = aLocation;
|
||||
|
|
|
@ -77,7 +77,7 @@ var gEditItemOverlay = {
|
|||
if (aInfo && aInfo.hiddenRows)
|
||||
this._hiddenRows = aInfo.hiddenRows;
|
||||
else
|
||||
this._hiddenRows.splice(0);
|
||||
this._hiddenRows.splice(0, this._hiddenRows.length);
|
||||
// force-read-only
|
||||
this._readOnly = aInfo && aInfo.forceReadOnly;
|
||||
},
|
||||
|
|
|
@ -474,7 +474,7 @@ SessionStoreService.prototype = {
|
|||
// preserved update our internal states to match that max
|
||||
case "sessionstore.max_tabs_undo":
|
||||
for (let ix in this._windows) {
|
||||
this._windows[ix]._closedTabs.splice(this._prefBranch.getIntPref("sessionstore.max_tabs_undo"));
|
||||
this._windows[ix]._closedTabs.splice(this._prefBranch.getIntPref("sessionstore.max_tabs_undo"), this._windows[ix]._closedTabs.length);
|
||||
}
|
||||
break;
|
||||
case "sessionstore.max_windows_undo":
|
||||
|
@ -1316,7 +1316,7 @@ SessionStoreService.prototype = {
|
|||
if (winState._closedTabs && winState._closedTabs.length) {
|
||||
let curWinState = this._windows[windowToUse.__SSi];
|
||||
curWinState._closedTabs = curWinState._closedTabs.concat(winState._closedTabs);
|
||||
curWinState._closedTabs.splice(this._prefBranch.getIntPref("sessionstore.max_tabs_undo"));
|
||||
curWinState._closedTabs.splice(this._prefBranch.getIntPref("sessionstore.max_tabs_undo"), curWinState._closedTabs.length);
|
||||
}
|
||||
|
||||
// Restore into that window - pretend it's a followup since we'll already
|
||||
|
@ -3719,7 +3719,7 @@ SessionStoreService.prototype = {
|
|||
if (normalWindowIndex >= maxWindowsUndo)
|
||||
spliceTo = normalWindowIndex + 1;
|
||||
#endif
|
||||
this._closedWindows.splice(spliceTo);
|
||||
this._closedWindows.splice(spliceTo, this._closedWindows.length);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче