Bug 264792 - Use dynamicDowncast<T> even more in the DOM
Summary: Use dynamicDowncast<T> even more in the DOM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-13 21:49 PST by Chris Dumez
Modified: 2023-11-14 09:00 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2023-11-13 21:49:39 PST
Use dynamicDowncast<T> even more in the DOM instead of is<T>() + downcast<T>(). It is less error-prone and often results in more concise code. I am also hoping to have downcast<>() do a type check on release builds in the future. It is currently too expensive to do so but it may become affordable if we use dynamicDowncast<T>() instead when possible.
Comment 1 Chris Dumez 2023-11-13 21:53:17 PST
Pull request: https://github.com/WebKit/WebKit/pull/20459
Comment 2 EWS 2023-11-14 08:59:52 PST
Committed 270710@main (7b68c9b9e188): <https://commits.webkit.org/270710@main>

Reviewed commits have been landed. Closing PR #20459 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-11-14 09:00:17 PST
<rdar://problem/118398612>