Skip to content

Commit

Permalink
Bug 1875484 - Add missing null check in Hal code. r=gsvelto
Browse files Browse the repository at this point in the history
  • Loading branch information
choller committed Jan 22, 2024
1 parent aaa4bbf commit d8e4526
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hal/Hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ void AssertMainThread() { MOZ_ASSERT(NS_IsMainThread()); }
bool InSandbox() { return GeckoProcessType_Content == XRE_GetProcessType(); }

bool WindowIsActive(nsPIDOMWindowInner* aWindow) {
NS_ENSURE_TRUE(aWindow, false);
dom::Document* document = aWindow->GetDoc();
NS_ENSURE_TRUE(document, false);
return !document->Hidden();
Expand Down

0 comments on commit d8e4526

Please sign in to comment.