Bug 1469769 - Part 1: a11y: Replace failing NS_NOTREACHED with NS_ERROR. r?asurkov draft
authorChris Peterson <cpeterson@mozilla.com>
Mon, 04 Jun 2018 01:44:18 -0700
changeset 808625 e61f74a1fe1c1a4fe228a0551567842c2c8475d3
parent 808580 e429320fcdd2d5236bb4713e6c435456146e42b9
child 808626 599868b974c9e5a6321feaa6b05af12c994bef02
push id113444
push usercpeterson@mozilla.com
push dateWed, 20 Jun 2018 07:17:30 +0000
reviewersasurkov
bugs1469769, 1126649
milestone62.0a1
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
accessible/base/SelectionManager.cpp
--- 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);