Bug 230467 - Replace dynamic_objc_cast<> with dynamic_ns_cast<>
Summary: Replace dynamic_objc_cast<> with dynamic_ns_cast<>
Status: CLOSED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords: InRadar
Depends on: 139893 139915 230227
Blocks:
  Show dependency treegraph
 
Reported: 2021-09-19 13:30 PDT by David Kilzer (:ddkilzer)
Modified: 2021-09-20 14:01 PDT (History)
15 users (show)

See Also:


Attachments
Patch v1 (40.15 KB, patch)
2021-09-19 14:05 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2021-09-19 13:30:29 PDT
Replace dynamic_objc_cast<> with dynamic_ns_cast<>.

dynamic_objc_cast<> was originally added for Bug 139893 in r177677, then moved to WTF for Bug 139915 in r177697.

dynamic_ns_cast<> was added for Bug 230227 in r282703 as part of <wtf/cocoa/TypeCastsNS.h>.

Since TypeCastsNS.h has an rvalue overload of dynamic_ns_cast<> and contains checked_ns_cast<> and has tests and is two characters less to type, let's replace dynamic_objc_cast<> with dynamic_ns_cast<>.

(Sorry Anders.)
Comment 1 David Kilzer (:ddkilzer) 2021-09-19 13:34:57 PDT
NOTE: There is internal code that uses dynamic_objc_cast<>, so that has to be updated before this lands.
Comment 2 Radar WebKit Bug Importer 2021-09-19 13:48:04 PDT
<rdar://problem/83287321>
Comment 3 David Kilzer (:ddkilzer) 2021-09-19 14:05:32 PDT
Created attachment 438619 [details]
Patch v1
Comment 4 David Kilzer (:ddkilzer) 2021-09-20 07:56:41 PDT
Comment on attachment 438619 [details]
Patch v1

In Bug 230406, Darin writes:

> Did you see my comment about dynamic_objc_cast? I think I prefer that name to dynamic_ns_cast.

So I'll either flip this, or close it and file a new bug.
Comment 5 David Kilzer (:ddkilzer) 2021-09-20 08:12:33 PDT
(In reply to David Kilzer (:ddkilzer) from comment #4)
> Comment on attachment 438619 [details]
> Patch v1
> 
> In Bug 230406, Darin writes:
> 
> > Did you see my comment about dynamic_objc_cast? I think I prefer that name to dynamic_ns_cast.
> 
> So I'll either flip this, or close it and file a new bug.

Moving this to RESOLVED/WONTFIX.
Comment 6 David Kilzer (:ddkilzer) 2021-09-20 14:01:49 PDT
(In reply to David Kilzer (:ddkilzer) from comment #4)
> Comment on attachment 438619 [details]
> Patch v1
> 
> In Bug 230406, Darin writes:
> 
> > Did you see my comment about dynamic_objc_cast? I think I prefer that name to dynamic_ns_cast.
> 
> So I'll either flip this, or close it and file a new bug.

Bug 230508: Rename {checked,dynamic}_ns_cast<> to {checked,dynamic}_objc_cast<>