Bug 141726 - Access FontCache global instance via singleton() static member function
Summary: Access FontCache global instance via singleton() static member function
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-17 14:40 PST by Chris Dumez
Modified: 2015-02-18 12:05 PST (History)
5 users (show)

See Also:


Attachments
Patch (25.64 KB, patch)
2015-02-17 15:54 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (27.35 KB, patch)
2015-02-17 16:44 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (27.46 KB, patch)
2015-02-17 16:53 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-02-17 14:40:51 PST
Access FontCache global instance via singleton() static member function, as per coding style.
Comment 1 Chris Dumez 2015-02-17 15:54:21 PST
Created attachment 246773 [details]
Patch
Comment 2 Chris Dumez 2015-02-17 16:44:45 PST
Created attachment 246780 [details]
Patch
Comment 3 Chris Dumez 2015-02-17 16:53:36 PST
Created attachment 246781 [details]
Patch
Comment 4 Daniel Bates 2015-02-17 21:15:27 PST
Comment on attachment 246781 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246781&action=review

We also need to update the Symbol Ordering Flags file Source/WebCore/WebCore.order. Did you intend to omit the list of changed functions from each ChangeLog entry?

> Source/WebCore/platform/graphics/FontGlyphs.cpp:40
> +    : m_cachedPrimaryFont(nullptr)

Would it make sense to use in-class initialization for this instance variable?

> Source/WebCore/platform/graphics/FontGlyphs.cpp:48
> +    : m_cachedPrimaryFont(nullptr)

Ditto.
Comment 5 Chris Dumez 2015-02-17 21:18:06 PST
Comment on attachment 246781 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=246781&action=review

>> Source/WebCore/platform/graphics/FontGlyphs.cpp:40
>> +    : m_cachedPrimaryFont(nullptr)
> 
> Would it make sense to use in-class initialization for this instance variable?

I don't know what's the policy for this. I like in-class initialization when this means we can get rid of the explicit constructor. However, if we need an explicit constructor, using also in-class initialization means we initialize members in 2 places.
Comment 6 Chris Dumez 2015-02-17 21:20:31 PST
(In reply to comment #4)
> Comment on attachment 246781 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=246781&action=review
> 
> We also need to update the Symbol Ordering Flags file
> Source/WebCore/WebCore.order.

Is this some very recent policy change? I was told not long ago that I should not update that file.

> Did you intend to omit the list of changed
> functions from each ChangeLog entry?

Yes, I was told keeping them makes little sense unless you add per method changelogs.
Comment 7 WebKit Commit Bot 2015-02-18 12:05:24 PST
Comment on attachment 246781 [details]
Patch

Clearing flags on attachment: 246781

Committed r180281: <http://trac.webkit.org/changeset/180281>
Comment 8 WebKit Commit Bot 2015-02-18 12:05:34 PST
All reviewed patches have been landed.  Closing bug.