Bug 128195 - [GTK] Replace DEFINE_STATIC_LOCAL with NeverDestroyed<T> in GTK WK1 and WK2 code
Summary: [GTK] Replace DEFINE_STATIC_LOCAL with NeverDestroyed<T> in GTK WK1 and WK2 code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 10:57 PST by Zan Dobersek
Modified: 2014-02-05 02:00 PST (History)
4 users (show)

See Also:


Attachments
Patch (9.82 KB, patch)
2014-02-04 10:59 PST, Zan Dobersek
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2014-02-04 10:57:10 PST
[GTK] Replace DEFINE_STATIC_LOCAL with NeverDestroyed<T> in GTK WK1 and WK2 code
Comment 1 Zan Dobersek 2014-02-04 10:59:32 PST
Created attachment 223140 [details]
Patch
Comment 2 WebKit Commit Bot 2014-02-04 11:00:48 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Martin Robinson 2014-02-04 11:02:09 PST
Comment on attachment 223140 [details]
Patch

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

> Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h:69
> +    friend class NeverDestroyed<PlatformStrategiesGtk>;

Why is this necessary?

> Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h:55
> +    friend class NeverDestroyed<WebGtkExtensionManager>;

Ditto.
Comment 4 Zan Dobersek 2014-02-04 11:32:31 PST
Comment on attachment 223140 [details]
Patch

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

>> Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h:69
>> +    friend class NeverDestroyed<PlatformStrategiesGtk>;
> 
> Why is this necessary?

So that NeverDestroyed<PlatformStrategiesGtk> can access the private PlatformStrategiesGtk constructor.
Comment 5 Zan Dobersek 2014-02-05 02:00:35 PST
Landed in r163433.
http://trac.webkit.org/changeset/163433