mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 845429: Cast a known-nonnegative index to be unsigned for comparison vs. nsTArray::Length(), in nsDocShell::GetChildAt. r=tbsaunde
This commit is contained in:
parent
a96f6b66a2
commit
eaf8119ef5
@ -3597,8 +3597,7 @@ nsDocShell::GetChildAt(int32_t aIndex, nsIDocShellTreeItem ** aChild)
|
||||
#ifdef DEBUG
|
||||
if (aIndex < 0) {
|
||||
NS_WARNING("Negative index passed to GetChildAt");
|
||||
}
|
||||
else if (aIndex >= mChildList.Length()) {
|
||||
} else if (static_cast<uint32_t>(aIndex) >= mChildList.Length()) {
|
||||
NS_WARNING("Too large an index passed to GetChildAt");
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user