Bug 185170

Summary: Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bfulgham, cdumez, ddkilzer, ews-watchlist, japhet, pvollan, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Daniel Bates
Reported 2018-05-01 11:49:44 PDT
We should rename CrossOriginPreflightResultCache::empty() to make it clear that it clears out the cache as opposed to testing whether the cache is empty as it is not standard terminology in both WebKit and the C++ Standard Template Library to use the word "empty" in its verb form for a function that clears out a collection. Additional remarks In WebKit a member function named "empty" is expected to return a new instance of the class in the "empty state". One example of this is StringImpl::empty() that returns a new StringImpl that represents the empty string. In the C++ Standard Template Library a member function named "empty" is expected to test its collection to determine if it vacant.
Attachments
Patch (7.36 KB, patch)
2018-05-01 11:56 PDT, Daniel Bates
no flags
Daniel Bates
Comment 1 2018-05-01 11:56:31 PDT
Daniel Bates
Comment 2 2018-05-02 15:25:28 PDT
I am open to naming suggestions.
Per Arne Vollan
Comment 3 2018-05-04 10:20:08 PDT
Comment on attachment 339211 [details] Patch R=me.
Daniel Bates
Comment 4 2018-05-07 10:38:31 PDT
Comment on attachment 339211 [details] Patch Clearing flags on attachment: 339211 Committed r231442: <https://trac.webkit.org/changeset/231442>
Daniel Bates
Comment 5 2018-05-07 10:38:33 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-05-07 10:39:24 PDT
Note You need to log in before you can comment on or make changes to this bug.