Bug 145776 - Access GCController instance via GCController::singleton() instead of a free function
Summary: Access GCController instance via GCController::singleton() instead of a free ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-08 16:12 PDT by Chris Dumez
Modified: 2015-06-08 17:30 PDT (History)
4 users (show)

See Also:


Attachments
Patch (18.12 KB, patch)
2015-06-08 16:18 PDT, Chris Dumez
darin: review+
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-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.