Bug 920881 - Fix assertion in nsSHistory::EvictOutOfRangeWindowContentViewers (r=smaug)

This commit is contained in:
Bill McCloskey 2013-09-30 12:24:33 -07:00
parent 87e214ec6b
commit 8ce7e1b22b
2 changed files with 1 additions and 7 deletions

View File

@ -939,10 +939,7 @@ nsSHistory::EvictOutOfRangeWindowContentViewers(int32_t aIndex)
if (aIndex < 0) {
return;
}
NS_ASSERTION(aIndex < mLength, "aIndex is out of range");
if (aIndex >= mLength) {
return;
}
NS_ENSURE_TRUE_VOID(aIndex < mLength);
// Calculate the range that's safe from eviction.
int32_t startSafeIndex = std::max(0, aIndex - gHistoryMaxViewers);

View File

@ -7,9 +7,6 @@
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript;version=1.7">
SimpleTest.expectAssertions(1);
</script>
<script type="application/javascript;version=1.7" src="browserElement_PurgeHistory.js">
</script>
</body>