From f743d8e9dde3cd5b7328abc5bfe88341fab9ea2f Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Sat, 26 May 2018 17:11:02 -0700 Subject: [PATCH] Bug 1469769 - Part 4: svg: Replace failing NS_NOTREACHED with NS_ERROR. r=heycam I'm replacing non-failing calls to NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE, but this NS_NOTREACHED fails when running the dom/svg/crashtests/412104-1.svg test. This assertion failure is bug 903785. This patch DOES NOT fix the cause of the assertion failure (a missing TextNodeCorrespondenceProperty). It just replaces this failing NS_NOTREACHED with NS_ERROR because I can't replace with a fatal MOZ_ASSERT_UNREACHABLE. MozReview-Commit-ID: 8ffEdO5W1zU --HG-- extra : rebase_source : 618008591b516e3b4b51871debcd0cf177a3f5b1 extra : intermediate-source : 099e1bbbc5b43b67ad9324464e4eec2e33d7eaa3 extra : source : f95d808c6f81b656c680d1dd005236571dedee20 --- layout/svg/SVGTextFrame.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp index 9ebd7af77d57..5852aab1b5a4 100644 --- a/layout/svg/SVGTextFrame.cpp +++ b/layout/svg/SVGTextFrame.cpp @@ -1333,8 +1333,9 @@ GetUndisplayedCharactersBeforeFrame(nsTextFrame* aFrame) TextNodeCorrespondence* correspondence = static_cast(value); if (!correspondence) { - NS_NOTREACHED("expected a TextNodeCorrespondenceProperty on nsTextFrame " - "used for SVG text"); + // FIXME bug 903785 + NS_ERROR("expected a TextNodeCorrespondenceProperty on nsTextFrame " + "used for SVG text"); return 0; } return correspondence->mUndisplayedCharacters;