Skip to content

Commit

Permalink
Bug 1545178 - Check that OwnerDoc is non-null within RemoveWindowList…
Browse files Browse the repository at this point in the history
…eners, r=qdot

This line appears to be perma-failing right now in `Android 7.0 x86-64
opt : M[tier-2](2)`. This seems to be being caused by the PContent's
channel being closed during shutdown also causing TabParents to be shut
down too late, after the document which they're embedded in has started
dying(?)

This patch just does the "obvious" thing of adding a null check (due to
it looking like a null dereference).

Differential Revision: https://phabricator.services.mozilla.com/D27947

--HG--
extra : moz-landing-system : lando
  • Loading branch information
mystor committed Apr 18, 2019
1 parent f61d3b4 commit f7b18dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dom/ipc/TabParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ void TabParent::AddWindowListeners() {
}

void TabParent::RemoveWindowListeners() {
if (mFrameElement && mFrameElement->OwnerDoc()->GetWindow()) {
if (mFrameElement && mFrameElement->OwnerDoc() &&
mFrameElement->OwnerDoc()->GetWindow()) {
nsCOMPtr<nsPIDOMWindowOuter> window =
mFrameElement->OwnerDoc()->GetWindow();
nsCOMPtr<EventTarget> eventTarget = window->GetTopWindowRoot();
Expand Down

0 comments on commit f7b18dd

Please sign in to comment.