Bug 175106 - Use LazyNeverDestroyed instead of DEFINE_GLOBAL for WebKitFontFamilyNames
Summary: Use LazyNeverDestroyed instead of DEFINE_GLOBAL for WebKitFontFamilyNames
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 174979
  Show dependency treegraph
 
Reported: 2017-08-02 18:46 PDT by Fujii Hironori
Modified: 2017-10-18 04:06 PDT (History)
4 users (show)

See Also:


Attachments
WIP patch (variable version) (2.72 KB, patch)
2017-08-02 18:52 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
WIP patch (inline function version) (11.91 KB, patch)
2017-08-02 19:54 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (3.66 KB, patch)
2017-10-17 19:57 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2017-08-02 18:46:13 PDT
Use LazyNeverDestroyed instead of DEFINE_GLOBAL for WebKitFontFamilyNames

This is a sub-task of Bug 174979.
Comment 1 Fujii Hironori 2017-08-02 18:50:41 PDT
In Bug 174150, 

> And we also change emptyAtom to emptyAtom() to get the value from LazyNeverDestroyed<>.

Yusuke changed emptyAtom from a varialbe to an inline function.

I'm wondering how I should do. I will create two WIP patches to begin a discussion.
Comment 2 Fujii Hironori 2017-08-02 18:52:15 PDT
Created attachment 317062 [details]
WIP patch (variable version)
Comment 3 Fujii Hironori 2017-08-02 19:54:05 PDT
Created attachment 317068 [details]
WIP patch (inline function version)
Comment 4 Fujii Hironori 2017-08-02 19:55:56 PDT
Hi Alex and Yusuke,
Which approach does look better? Give me your feedback.
Comment 5 Yusuke Suzuki 2017-08-02 20:02:08 PDT
I like the approach not using inline function if we do not need to annotate ".get()" so many.
Comment 6 Fujii Hironori 2017-10-17 19:57:35 PDT
Created attachment 324090 [details]
Patch
Comment 7 Yusuke Suzuki 2017-10-18 03:37:43 PDT
Comment on attachment 324090 [details]
Patch

r=me
Comment 8 WebKit Commit Bot 2017-10-18 04:05:43 PDT
Comment on attachment 324090 [details]
Patch

Clearing flags on attachment: 324090

Committed r223600: <https://trac.webkit.org/changeset/223600>
Comment 9 WebKit Commit Bot 2017-10-18 04:05:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2017-10-18 04:06:55 PDT
<rdar://problem/35049570>