Bug 205670

Summary: Declare some classes as final.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, msaboff, saam, sam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. none

Mark Lam
Reported 2019-12-31 19:59:50 PST
There are a few "Status" classes, all of whom have static computeFor() methods. All of these classes do not have derived classes, and are independent of each others in terms of inheritance relationships. By explicitly declaring them as final, we can make it clear that a call to any unqualified computeFor() methods must be from the self class, and that external calls to any given computeFor() method qualified with a class name is defined in that class (and is not inherited). This detail may already be known to folks who are familiar with these classes. Declaring them as final helps surface this independence for readers of the code who is not already in the know.
Attachments
proposed patch. (4.22 KB, patch)
2019-12-31 20:12 PST, Mark Lam
no flags
Mark Lam
Comment 1 2019-12-31 20:12:27 PST
Created attachment 386572 [details] proposed patch.
Mark Lam
Comment 2 2020-01-01 09:44:25 PST
Comment on attachment 386572 [details] proposed patch. Thanks for the review. Landing now.
WebKit Commit Bot
Comment 3 2020-01-01 10:29:41 PST
Comment on attachment 386572 [details] proposed patch. Clearing flags on attachment: 386572 Committed r253969: <https://trac.webkit.org/changeset/253969>
WebKit Commit Bot
Comment 4 2020-01-01 10:29:42 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2020-01-01 10:30:21 PST
Note You need to log in before you can comment on or make changes to this bug.