mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 624758, [@nsSHistory::EvictContentViewersInRange] and [@nsSHistory::EvictGlobalContentViewer], r=bz
This commit is contained in:
parent
5590c58b15
commit
08504d7888
@ -903,10 +903,8 @@ nsSHistory::EvictContentViewersInRange(PRInt32 aStart, PRInt32 aEnd)
|
||||
{
|
||||
nsCOMPtr<nsISHTransaction> trans;
|
||||
GetTransactionAtIndex(aStart, getter_AddRefs(trans));
|
||||
if (!trans)
|
||||
return;
|
||||
|
||||
for (PRInt32 i = aStart; i < aEnd; ++i) {
|
||||
for (PRInt32 i = aStart; trans && i < aEnd; ++i) {
|
||||
nsCOMPtr<nsISHEntry> entry;
|
||||
trans->GetSHEntry(getter_AddRefs(entry));
|
||||
nsCOMPtr<nsIContentViewer> viewer;
|
||||
@ -970,13 +968,8 @@ nsSHistory::EvictGlobalContentViewer()
|
||||
shist->mIndex + gHistoryMaxViewers);
|
||||
nsCOMPtr<nsISHTransaction> trans;
|
||||
shist->GetTransactionAtIndex(startIndex, getter_AddRefs(trans));
|
||||
|
||||
if (!trans) {
|
||||
shist = static_cast<nsSHistory*>(PR_NEXT_LINK(shist));
|
||||
continue;
|
||||
}
|
||||
|
||||
for (PRInt32 i = startIndex; i <= endIndex; ++i) {
|
||||
for (PRInt32 i = startIndex; trans && i <= endIndex; ++i) {
|
||||
nsCOMPtr<nsISHEntry> entry;
|
||||
trans->GetSHEntry(getter_AddRefs(entry));
|
||||
nsCOMPtr<nsIContentViewer> viewer;
|
||||
|
Loading…
Reference in New Issue
Block a user