Bug 128195

Summary: [GTK] Replace DEFINE_STATIC_LOCAL with NeverDestroyed<T> in GTK WK1 and WK2 code
Product: WebKit Reporter: Zan Dobersek <zan>
Component: New BugsAssignee: Zan Dobersek <zan>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, gustavo, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

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