We may want to hunt through the other cases of default: ASSERT_NOT_REACHED() 
and clobber those with RELEASE_ASSERT_NOT_REACHED() as well.

I wonder if it would be easier to have DEFAULT_NOT_REACHED() and DEFAULT_OKAY() 
macros, and convince the style bot to require ether a default: block or one of 
these two macros at the end of every switch?

--Oliver

On Sep 13, 2013, at 10:29 AM, Darin Adler <da...@apple.com> wrote:

> On Sep 13, 2013, at 10:28 AM, Alexey Proskuryakov <a...@apple.com> wrote:
> 
>> 13 сент. 2013 г., в 10:13, Darin Adler <da...@apple.com> написал(а):
>> 
>>> Since there’s no runtime guarantee that the enum will have a valid value, I 
>>> think there needs to be a return statement outside the switch, even if we 
>>> have ASSERT_NOT_REACHED before it.
>> 
>> Should it be a RELEASE_ASSERT? If we have a bad value in an enum, it's 
>> likely a memory smasher, so it's best to crash before it's exploited.
> 
> Sure, that’d be OK with me.
> 
> -- Darin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to