Bug 1652092 - Fix potential use of uninitialized value in Document::TopLayerPop(). r=sefeng,emilio

Differential Revision: https://phabricator.services.mozilla.com/D83155
This commit is contained in:
Alexey Izbyshev 2020-07-31 11:04:08 +00:00
Родитель ee30e1545b
Коммит 21cd9b3b9c
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -13527,7 +13527,7 @@ Element* Document::TopLayerPop(FunctionRef<bool(Element*)> aPredicateFunc) {
// Remove the topmost element that qualifies aPredicate; This
// is required is because the top layer contains not only
// fullscreen elements, but also dialog elements.
Element* removedElement;
Element* removedElement = nullptr;
for (auto i : Reversed(IntegerRange(mTopLayer.Length()))) {
nsCOMPtr<Element> element(do_QueryReferent(mTopLayer[i]));
if (element && aPredicateFunc(element)) {