Bug 1342520 - Make sure when setting the default feature state to disabled, it's set to an actual failure status. r=dvander
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 24 Feb 2017 15:43:33 -0500
changeset 374216 51786eff9fa18f156357ac441a2452ea4e2b4aaa
parent 374215 89c1817a4d2ff73c73d42af60eff758977d9c06c
child 374217 48c662cadc6faadde91fe1ea8bbfbdd2107cd4b1
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1342520
milestone54.0a1
Bug 1342520 - Make sure when setting the default feature state to disabled, it's set to an actual failure status. r=dvander MozReview-Commit-ID: 3KxC5oQg1wL
gfx/config/gfxFeature.cpp
--- a/gfx/config/gfxFeature.cpp
+++ b/gfx/config/gfxFeature.cpp
@@ -185,16 +185,19 @@ void
 FeatureState::DisableByDefault(FeatureStatus aStatus, const char* aMessage,
                                const nsACString& aFailureId)
 {
   // User/runtime decisions should not have been made yet.
   MOZ_ASSERT(!mUser.IsInitialized());
   MOZ_ASSERT(!mEnvironment.IsInitialized());
   MOZ_ASSERT(!mRuntime.IsInitialized());
 
+  // Make sure that when disabling we actually use a failure status.
+  MOZ_ASSERT(IsFeatureStatusFailure(aStatus));
+
   mDefault.Set(aStatus, aMessage);
   SetFailureId(aFailureId);
 }
 
 void
 FeatureState::SetUser(FeatureStatus aStatus, const char* aMessage)
 {
   // Default decision must have been made, but not runtime or environment.