[webkit-reviews] review granted: [Bug 210729] Remove dynamic_cf_cast<>() and replace it with checked_cf_cast<>() : [Attachment 396936] Patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 19 19:47:31 PDT 2020


Darin Adler <darin at apple.com> has granted David Kilzer (:ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 210729: Remove dynamic_cf_cast<>() and replace it with checked_cf_cast<>()
https://bugs.webkit.org/show_bug.cgi?id=210729

Attachment 396936: Patch v1

https://bugs.webkit.org/attachment.cgi?id=396936&action=review




--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 396936
  --> https://bugs.webkit.org/attachment.cgi?id=396936
Patch v1

I’m OK with this.

Are there any of these cases where it would be better if the wrong type was
silently ignored instead of crashing?

Separately, I’m not sure we should remove dynamic_cf_cast. Some clients might
have a reason to use it, just not in these decode functions. It’s the same
concept as dynamic_objc_cast and dynamic_cast. I think instead we should
consider removing the assertion from it instead of removing it entirely.


More information about the webkit-reviews mailing list