Bug 1469769 - Part 2: animation: 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 devtools/client/animationinspector/test/browser_animation_refresh_on_removed_animation.js test. This assertion failure is bug 1189015.

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: H5rfyr71N1M

--HG--
extra : rebase_source : a65053171f41bc6069fc6cb3688c0a9cc36830b2
extra : intermediate-source : 203b3e7b091743faebcf58d576360d1afd85b6bc
extra : source : 12dcc693259a536ac06075698db7e851d682cf3a
This commit is contained in:
Chris Peterson 2018-06-04 01:44:39 -07:00
parent e3b1f171c9
commit d8afcd19f3

View file

@ -847,9 +847,14 @@ public:
case eState_Removed:
entry->mState = eState_RemainedPresent;
break;
default:
NS_NOTREACHED("shouldn't have observed an animation being added "
"twice");
case eState_Added:
// FIXME bug 1189015
NS_ERROR("shouldn't have observed an animation being added twice");
break;
case eState_RemainedPresent:
MOZ_ASSERT_UNREACHABLE("shouldn't have observed an animation "
"remaining present");
break;
}
} else {
entry = sCurrentBatch->AddEntry(aAnimation, aTarget);
@ -887,9 +892,14 @@ public:
case eState_Added:
entry->mState = eState_RemainedAbsent;
break;
default:
NS_NOTREACHED("shouldn't have observed an animation being removed "
"twice");
case eState_RemainedAbsent:
MOZ_ASSERT_UNREACHABLE("shouldn't have observed an animation "
"remaining absent");
break;
case eState_Removed:
// FIXME bug 1189015
NS_ERROR("shouldn't have observed an animation being removed twice");
break;
}
} else {
entry = sCurrentBatch->AddEntry(aAnimation, aTarget);