mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 921311 - Fix out-of-bounds index in session history collection (r=ttaubert)
This commit is contained in:
parent
945f83d0c7
commit
d95776b1fb
@ -74,7 +74,9 @@ let SessionHistoryInternal = {
|
||||
debug("SessionStore failed gathering complete history " +
|
||||
"for the focused window/tab. See bug 669196.");
|
||||
}
|
||||
data.index = history.index + 1;
|
||||
|
||||
// Ensure the index isn't out of bounds if an exception was thrown above.
|
||||
data.index = Math.min(history.index + 1, data.entries.length);
|
||||
} else {
|
||||
let uri = webNavigation.currentURI.spec;
|
||||
// We landed here because the history is inaccessible or there are no
|
||||
|
Loading…
Reference in New Issue
Block a user