From 6ec87044eaeaca0a81e30b426e16df90e510a331 Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Fri, 21 Feb 2014 01:52:02 +0200 Subject: [PATCH] Bug 974127 - nsContentUtils::IsUserFocusIgnored can loop infinitely, r=ehsan --HG-- extra : rebase_source : 303c25586b6ff1c326241d9aa192fc8235359083 --- content/base/src/nsContentUtils.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 0266f88b3dad..f91498db40d3 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -5842,9 +5842,7 @@ nsContentUtils::IsUserFocusIgnored(nsINode* aNode) return true; } nsPIDOMWindow* win = aNode->OwnerDoc()->GetWindow(); - if (win) { - aNode = win->GetFrameElementInternal(); - } + aNode = win ? win->GetFrameElementInternal() : nullptr; } return false;