Bug 1342520 - Make sure when setting the default feature state to disabled, it's set to an actual failure status. r?dvander draft
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 24 Feb 2017 15:43:33 -0500
changeset 489358 0c4b8f00e32aa2eec2d06c3768247100abc09d3b
parent 489357 83a2f0fa67410c45ae17e1647823f94b05832441
child 546995 784c94e7a1a5d1fa0770c8b2f772557c79058701
push id46816
push userkgupta@mozilla.com
push dateFri, 24 Feb 2017 20:44:04 +0000
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.