[webkit-reviews] review granted: [Bug 121776] Add toWebKitCSS*Value functions to cast from CSSValue : [Attachment 212318] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 23 09:59:44 PDT 2013


Darin Adler <darin at apple.com> has granted Gyuyoung Kim
<gyuyoung.kim at samsung.com>'s request for review:
Bug 121776: Add toWebKitCSS*Value functions to cast from CSSValue
https://bugs.webkit.org/show_bug.cgi?id=121776

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

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=212318&action=review


r=me but we have follow-up work to do on toWebKitCSSShaderValue

> Source/WebCore/css/WebKitCSSShaderValue.h:76
>  inline WebKitCSSShaderValue* toWebKitCSSShaderValue(CSSValue* value)
>  {
> +    ASSERT_WITH_SECURITY_IMPLICATION(!value ||
value->isWebKitCSSShaderValue());
>      return value->isWebKitCSSShaderValue() ?
static_cast<WebKitCSSShaderValue*>(value) : 0;
>  }

This is not right. The existing version of this function is doing a type check
and returning nullptr. That does not fit the pattern. We should visit the call
sites and add isWebKitCSSShaderValue checks as needed, and then remove that
feature. We don’t want to leave things so that one of these toXXX functions
does type checking, and lots of others do not.


More information about the webkit-reviews mailing list