#399: null check in FindNearestCommonAncestorFrame from PM 978

This commit is contained in:
Cameron Kaiser 2019-03-31 21:51:32 -07:00
parent 37789a58a8
commit 23f3034604
1 changed files with 4 additions and 0 deletions

View File

@ -2509,6 +2509,10 @@ nsLayoutUtils::GetTransformToAncestorScaleExcludingAnimated(nsIFrame* aFrame)
nsIFrame*
nsLayoutUtils::FindNearestCommonAncestorFrame(nsIFrame* aFrame1, nsIFrame* aFrame2)
{
if (MOZ_UNLIKELY(!aFrame1 || !aFrame2)) {
return nullptr;
}
nsAutoTArray<nsIFrame*,100> ancestors1;
nsAutoTArray<nsIFrame*,100> ancestors2;
nsIFrame* commonAncestor = nullptr;