Bug 176120 - Add "Identified" base class to replace a whole bunch of custom identifier generators
Summary: Add "Identified" base class to replace a whole bunch of custom identifier gen...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-30 13:13 PDT by Brady Eidson
Modified: 2017-08-30 14:51 PDT (History)
11 users (show)

See Also:


Attachments
Patch (59.88 KB, patch)
2017-08-30 13:51 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2017-08-30 13:13:38 PDT
Add "Identified" base class to replace a whole bunch of custom identifier generators

A common pattern in WebCore and WebKit is:
uint64_t identifier() const { return m_identifier; }
...
Along with a static function/generator to increment the next identifier for the next instance of the class.

We repeat this code, a lot. And that's silly.

Let's do it as a template base class instead.
Comment 1 Brady Eidson 2017-08-30 13:51:34 PDT
Created attachment 319394 [details]
Patch
Comment 2 WebKit Commit Bot 2017-08-30 14:50:31 PDT
Comment on attachment 319394 [details]
Patch

Clearing flags on attachment: 319394

Committed r221399: <http://trac.webkit.org/changeset/221399>
Comment 3 WebKit Commit Bot 2017-08-30 14:50:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2017-08-30 14:51:50 PDT
<rdar://problem/34172937>