зеркало из https://github.com/mozilla/gecko-dev.git
Bug 663922 - Prevent null dereference of history transactions. r=smaug
This commit is contained in:
Родитель
c25dc9c3aa
Коммит
3b87fa1e32
|
@ -888,7 +888,7 @@ nsSHistory::EvictWindowContentViewers(PRInt32 aFromIndex, PRInt32 aToIndex)
|
|||
|
||||
// Walk the full session history and check that entries outside the window
|
||||
// around aFromIndex have no content viewers
|
||||
for (PRInt32 i = 0; i < mLength; ++i) {
|
||||
for (PRInt32 i = 0; trans && i < mLength; ++i) {
|
||||
if (i < aFromIndex - gHistoryMaxViewers ||
|
||||
i > aFromIndex + gHistoryMaxViewers) {
|
||||
nsCOMPtr<nsISHEntry> entry;
|
||||
|
@ -1087,7 +1087,7 @@ nsSHistory::EvictExpiredContentViewerForEntry(nsISHEntry *aEntry)
|
|||
GetTransactionAtIndex(startIndex, getter_AddRefs(trans));
|
||||
|
||||
PRInt32 i;
|
||||
for (i = startIndex; i <= endIndex; ++i) {
|
||||
for (i = startIndex; trans && i <= endIndex; ++i) {
|
||||
nsCOMPtr<nsISHEntry> entry;
|
||||
trans->GetSHEntry(getter_AddRefs(entry));
|
||||
if (entry == aEntry)
|
||||
|
|
Загрузка…
Ссылка в новой задаче