зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1729545, Try to ensure session history loads can't get stuck because of bogus requested index, r=peterv
Requested index handling is very fragile. We should try to figure out a way to remove it altogether. (But unfortunately some behavior similar to it is needed in certain cases). The patch is a stop-gap solution. Differential Revision: https://phabricator.services.mozilla.com/D137479
This commit is contained in:
Родитель
2d296e8968
Коммит
a959481f5a
|
@ -2047,7 +2047,11 @@ nsresult nsSHistory::LoadEntry(int32_t aIndex, long aLoadType,
|
|||
|
||||
if (aIndex < 0 || aIndex >= Length()) {
|
||||
MOZ_LOG(gSHistoryLog, LogLevel::Debug, ("Index out of range"));
|
||||
// The index is out of range
|
||||
// The index is out of range.
|
||||
// Clear the requested index in case it had bogus value. This way the next
|
||||
// load succeeds if the offset is reasonable.
|
||||
mRequestedIndex = -1;
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче