[Webkit-unassigned] [Bug 95316] Refactoring LLInt::Data to be a singleton

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 29 08:07:59 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=95316


Geoffrey Garen <ggaren at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #161195|review?                     |review-
               Flag|                            |




--- Comment #6 from Geoffrey Garen <ggaren at apple.com>  2012-08-29 08:08:03 PST ---
(From update of attachment 161195)
View in context: https://bugs.webkit.org/attachment.cgi?id=161195&action=review

Looks good to me. I have one edit I'd like to see before marking this r+.

> Source/JavaScriptCore/llint/LLIntData.cpp:44
> +    if (!Data::s_isInitialized) {

Please remove s_isInitialized and this test of it. This test is neither necessary nor sufficient for a thread-safe singleton. It isn't necessary because you're using the initializeThreading() hook to ensure a thread-safe singleton. It isn't sufficient because this branch isn't guarded by a lock.

Side note about WebKit style: When we do use checks like this, we prefer "if (!condition) { early return }" style, to reduce the amount of indentation in a function.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list