[webkit-reviews] review granted: [Bug 83536] Don't allow fallthrough for CSSPropertyBaselineShift in CSSComputedStyleDeclaration::getSVGPropertyCSSValue(). : [Attachment 136370] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 9 20:53:43 PDT 2012


Daniel Bates <dbates at webkit.org> has granted Luke Macpherson
<macpherson at chromium.org>'s request for review:
Bug 83536: Don't allow fallthrough for CSSPropertyBaselineShift in
CSSComputedStyleDeclaration::getSVGPropertyCSSValue().
https://bugs.webkit.org/show_bug.cgi?id=83536

Attachment 136370: Patch
https://bugs.webkit.org/attachment.cgi?id=136370&action=review

------- Additional Comments from Daniel Bates <dbates at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=136370&action=review


> Source/WebCore/ChangeLog:11
> +	   I don't think this return is reachable, but if it were, falling
through to the next case would be
> +	   the wrong thing to do, so this may catch a future bug one day.

Although somewhat contrived, the presence of the "return 0;" statement would
the catch the case where a person removed the enum values BS_BASELINE, BS_SUB,
BS_SUPER, BS_LENGTH and instead declared integer variables of the same name.

> Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp:177
> +	       return 0;

Can we add ASSERT_NOT_REACHED() above this line?


More information about the webkit-reviews mailing list