Bug 1488321 - Update comm-central for nsISHEntry.{index,getEntryAtIndex()} changes. r=frg
'index' is now writable, and getEntryAtIndex() has lost its second argument.
This commit is contained in:
Родитель
4dc0fffdce
Коммит
ccb08c7468
|
@ -45,7 +45,7 @@ function FillHistoryMenu(aParent, aMenu)
|
|||
return false;
|
||||
for (let j = index - 1; j >= end; j--)
|
||||
{
|
||||
let entry = sessionHistory.getEntryAtIndex(j, false);
|
||||
let entry = sessionHistory.getEntryAtIndex(j);
|
||||
if (entry)
|
||||
createHistoryMenuItem(aParent, j, entry);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ function FillHistoryMenu(aParent, aMenu)
|
|||
return false;
|
||||
for (let j = index + 1; j <= end; j++)
|
||||
{
|
||||
let entry = sessionHistory.getEntryAtIndex(j, false);
|
||||
let entry = sessionHistory.getEntryAtIndex(j);
|
||||
if (entry)
|
||||
createHistoryMenuItem(aParent, j, entry);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ function FillHistoryMenu(aParent, aMenu)
|
|||
: 0;
|
||||
for (let j = count - 1; j >= end; j--)
|
||||
{
|
||||
let entry = sessionHistory.getEntryAtIndex(j, false);
|
||||
let entry = sessionHistory.getEntryAtIndex(j);
|
||||
if (entry)
|
||||
createHistoryMenuItem(aParent, j, entry, endHistory, j == index);
|
||||
}
|
||||
|
|
|
@ -2010,7 +2010,7 @@
|
|||
var newSH = Cc["@mozilla.org/browser/shistory;1"]
|
||||
.createInstance(Ci.nsISHistory);
|
||||
oldBrowser.webNavigation.sessionHistory = newSH;
|
||||
var entry = oldSH.getEntryAtIndex(oldSH.index, false)
|
||||
var entry = oldSH.getEntryAtIndex(oldSH.index)
|
||||
.QueryInterface(Ci.nsISHEntry)
|
||||
.clone();
|
||||
// The bfcache entry is tightly coupled to the original shistory it
|
||||
|
|
|
@ -490,7 +490,7 @@ function FillHistoryMenu(aParent, aMenu)
|
|||
if ((index - 1) < end) return false;
|
||||
for (j = index - 1; j >= end; j--)
|
||||
{
|
||||
entry = sessionHistory.getEntryAtIndex(j, false);
|
||||
entry = sessionHistory.getEntryAtIndex(j);
|
||||
if (entry)
|
||||
createMenuItem(aParent, j, entry.title);
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ function FillHistoryMenu(aParent, aMenu)
|
|||
if ((index + 1) > end) return false;
|
||||
for (j = index + 1; j <= end; j++)
|
||||
{
|
||||
entry = sessionHistory.getEntryAtIndex(j, false);
|
||||
entry = sessionHistory.getEntryAtIndex(j);
|
||||
if (entry)
|
||||
createMenuItem(aParent, j, entry.title);
|
||||
}
|
||||
|
|
|
@ -1466,7 +1466,7 @@ SessionStoreService.prototype = {
|
|||
else if (history && history.count > 0) {
|
||||
try {
|
||||
for (var j = 0; j < history.count; j++) {
|
||||
let entry = this._serializeHistoryEntry(history.getEntryAtIndex(j, false),
|
||||
let entry = this._serializeHistoryEntry(history.getEntryAtIndex(j),
|
||||
aFullData, aTab.pinned);
|
||||
tabData.entries.push(entry);
|
||||
}
|
||||
|
@ -1697,7 +1697,7 @@ SessionStoreService.prototype = {
|
|||
for (let i = 0; i < aHistory.count; i++) {
|
||||
let principal;
|
||||
try {
|
||||
let uri = aHistory.getEntryAtIndex(i, false).URI;
|
||||
let uri = aHistory.getEntryAtIndex(i).URI;
|
||||
principal = SecMan.getDocShellCodebasePrincipal(uri, aDocShell);
|
||||
}
|
||||
catch (ex) {
|
||||
|
@ -2768,7 +2768,7 @@ SessionStoreService.prototype = {
|
|||
// force session history to update its internal index and call reload
|
||||
// instead of gotoIndex. See bug 597315.
|
||||
var sessionHistory = browser.webNavigation.sessionHistory;
|
||||
sessionHistory.getEntryAtIndex(activeIndex, true);
|
||||
sessionHistory.index = activeIndex;
|
||||
sessionHistory.reloadCurrentEntry();
|
||||
}
|
||||
catch (ex) {
|
||||
|
|
|
@ -41,11 +41,11 @@ function test()
|
|||
|
||||
function compareEntries(i, j, history)
|
||||
{
|
||||
let e1 = history.getEntryAtIndex(i, false)
|
||||
let e1 = history.getEntryAtIndex(i)
|
||||
.QueryInterface(Ci.nsISHEntry)
|
||||
.QueryInterface(Ci.nsISHContainer);
|
||||
|
||||
let e2 = history.getEntryAtIndex(j, false)
|
||||
let e2 = history.getEntryAtIndex(j)
|
||||
.QueryInterface(Ci.nsISHEntry)
|
||||
.QueryInterface(Ci.nsISHContainer);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче