Bug 1469769 - Part 1: a11y: Replace failing NS_NOTREACHED with NS_ERROR. r?asurkov
I'm replacing non-failing calls to NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE, but this SelectionManager assertion fails when running the testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py TestBackForwardNavigation.test_non_remote_about_pages marionette test. This assertion failure is
bug 1126649.
This patch DOES NOT fix the cause of the assertion failure (a missing HyperTextAccessible). It just replaces this failing NS_NOTREACHED with NS_ERROR because I can't replace with a fatal MOZ_ASSERT_UNREACHABLE.
MozReview-Commit-ID: EVfyZlMwN4p
--- a/accessible/base/SelectionManager.cpp
+++ b/accessible/base/SelectionManager.cpp
@@ -204,17 +204,18 @@ SelectionManager::ProcessSelectionChange
cntrNode = selection->GetPresShell()->GetDocument();
NS_ASSERTION(aSelData->mSel->GetPresShell()->ConstFrameSelection() == selection->GetFrameSelection(),
"Wrong selection container was used!");
}
}
HyperTextAccessible* text = nsAccUtils::GetTextContainer(cntrNode);
if (!text) {
- NS_NOTREACHED("We must reach document accessible implementing text interface!");
+ // FIXME bug 1126649
+ NS_ERROR("We must reach document accessible implementing text interface!");
return;
}
if (selection->GetType() == SelectionType::eNormal) {
RefPtr<AccEvent> event =
new AccTextSelChangeEvent(text, selection, aSelData->mReason);
text->Document()->FireDelayedEvent(event);