From f71a066625b0976b2458ae3f2fbd581535fd94ba Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Tue, 13 Oct 2015 22:00:35 +0300 Subject: [PATCH] Bug 1214316 - Improve assertions on top level remote accessible doc handling, r=tbsaunde --- accessible/generic/OuterDocAccessible.cpp | 7 +------ dom/ipc/TabParent.cpp | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/accessible/generic/OuterDocAccessible.cpp b/accessible/generic/OuterDocAccessible.cpp index 792afd138ad..daf7b77de8b 100644 --- a/accessible/generic/OuterDocAccessible.cpp +++ b/accessible/generic/OuterDocAccessible.cpp @@ -192,10 +192,5 @@ OuterDocAccessible::RemoteChildDoc() const if (!tab) return nullptr; - if (DocAccessibleParent* doc = tab->GetTopLevelDocAccessible()) { - return doc; - } - - MOZ_ASSERT(false, "no top level tab document?"); - return nullptr; + return tab->GetTopLevelDocAccessible(); } diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 1417f247793..bfbead5efa0 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -1454,6 +1454,9 @@ TabParent::GetTopLevelDocAccessible() const return doc; } } + + MOZ_ASSERT(docCount == 0, "If there isn't a top level accessible doc " + "there shouldn't be an accessible doc at all!"); #endif return nullptr; }