Bug 145776

Summary: Access GCController instance via GCController::singleton() instead of a free function
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: JavaScriptCoreAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, ggaren, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Chris Dumez 2015-06-08 16:12:26 PDT
Access GCController instance via GCController::singleton() instead of a free function as per coding style and for consistency with other singleton classes in the codebase.
Comment 1 Chris Dumez 2015-06-08 16:18:11 PDT
Created attachment 254521 [details]
Patch
Comment 2 Darin Adler 2015-06-08 17:26:46 PDT
Comment on attachment 254521 [details]
Patch

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

> Source/WebCore/bindings/js/GCController.cpp:50
> +    static NeverDestroyed<GCController> gcController;
> +    return gcController;

I would have just named this local "controller".

> Source/WebCore/bindings/js/GCController.h:37
> +    WTF_MAKE_NONCOPYABLE(GCController); WTF_MAKE_FAST_ALLOCATED;

No need for WTF_MAKE_FAST_ALLOCATED.
Comment 3 Chris Dumez 2015-06-08 17:28:49 PDT
Committed r185342: <http://trac.webkit.org/changeset/185342>
Comment 4 Chris Dumez 2015-06-08 17:30:02 PDT
Comment on attachment 254521 [details]
Patch

Made nit fixes before landing.