Bug 1319994 - Use NS_ERROR for not-implemented CSS rules. r=heycam
authorXidorn Quan <me@upsuper.org>
Thu, 24 Nov 2016 16:28:28 +1100
changeset 324045 3a60967cd9ed58bf2ec9573b0185e3537a42518c
parent 324044 a35328bd4d0742434319ebd2e9cd7de3b075f660
child 324046 cb29571e849184f019cf7343afb0ac6d36fa0e11
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersheycam
bugs1319994
milestone53.0a1
Bug 1319994 - Use NS_ERROR for not-implemented CSS rules. r=heycam MozReview-Commit-ID: 9E1ThQuqBf1
layout/style/ServoCSSRuleList.cpp
--- a/layout/style/ServoCSSRuleList.cpp
+++ b/layout/style/ServoCSSRuleList.cpp
@@ -42,17 +42,18 @@ ServoCSSRuleList::IndexedGetter(uint32_t
         break;
       }
       case nsIDOMCSSRule::MEDIA_RULE:
       case nsIDOMCSSRule::FONT_FACE_RULE:
       case nsIDOMCSSRule::KEYFRAMES_RULE:
       case nsIDOMCSSRule::NAMESPACE_RULE:
         // XXX create corresponding rules
       default:
-        MOZ_CRASH("stylo: not implemented yet");
+        NS_ERROR("stylo: not implemented yet");
+        return nullptr;
     }
     ruleObj->SetStyleSheet(mStyleSheet);
     rule = CastToUint(ruleObj.forget().take());
     mRules[aIndex] = rule;
   }
   return CastToPtr(rule)->GetDOMRule();
 }