mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1230918 - remove useless null-pointer check on aChild that only caused a Coverity - Dereference before null check. r=dbaron
MozReview-Commit-ID: JzpMNHYEpgu --HG-- extra : rebase_source : 98c9007ef160bffa18a847bc722de29d2719a454
This commit is contained in:
parent
4ae855e98c
commit
46186eac3d
@ -4296,14 +4296,12 @@ PresShell::ContentRemoved(nsIDocument *aDocument,
|
||||
|
||||
// We should check that aChild does not contain pointer capturing elements.
|
||||
// If it does we should release the pointer capture for the elements.
|
||||
if (aChild) {
|
||||
for (auto iter = gPointerCaptureList->Iter(); !iter.Done(); iter.Next()) {
|
||||
nsIPresShell::PointerCaptureInfo* data = iter.UserData();
|
||||
if (data && data->mOverrideContent &&
|
||||
nsContentUtils::ContentIsDescendantOf(data->mOverrideContent,
|
||||
aChild)) {
|
||||
nsIPresShell::ReleasePointerCapturingContent(iter.Key());
|
||||
}
|
||||
for (auto iter = gPointerCaptureList->Iter(); !iter.Done(); iter.Next()) {
|
||||
nsIPresShell::PointerCaptureInfo* data = iter.UserData();
|
||||
if (data && data->mOverrideContent &&
|
||||
nsContentUtils::ContentIsDescendantOf(data->mOverrideContent,
|
||||
aChild)) {
|
||||
nsIPresShell::ReleasePointerCapturingContent(iter.Key());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user