Changeset 260731 in webkit


Ignore:
Timestamp:
Apr 26, 2020 2:17:43 PM (4 years ago)
Author:
ysuzuki@apple.com
Message:

Use static Lock instead of static NeverDestroyed<Lock>
https://bugs.webkit.org/show_bug.cgi?id=211036

Reviewed by Darin Adler.

Source/WebCore:

  • platform/GenericTaskQueue.cpp:

(WebCore::TaskDispatcher<Timer>::sharedLock):

Source/WTF:

Lock can be static-initialized since it has constexpr constructor. No need to use NeverDestroyed<Lock>.

  • wtf/Logger.h:

(WTF::Logger::observerLock):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r260727 r260731  
     12020-04-26  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Use `static Lock` instead of `static NeverDestroyed<Lock>`
     4        https://bugs.webkit.org/show_bug.cgi?id=211036
     5
     6        Reviewed by Darin Adler.
     7
     8        Lock can be static-initialized since it has constexpr constructor. No need to use NeverDestroyed<Lock>.
     9
     10        * wtf/Logger.h:
     11        (WTF::Logger::observerLock):
     12
    1132020-04-26  Joonghun Park  <jh718.park@samsung.com>
    214
  • trunk/Source/WTF/wtf/Logger.h

    r259707 r260731  
    368368    static Lock& observerLock()
    369369    {
    370         static NeverDestroyed<Lock> observerLock;
     370        static Lock observerLock;
    371371        return observerLock;
    372372    }
  • trunk/Source/WebCore/ChangeLog

    r260729 r260731  
     12020-04-26  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Use `static Lock` instead of `static NeverDestroyed<Lock>`
     4        https://bugs.webkit.org/show_bug.cgi?id=211036
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/GenericTaskQueue.cpp:
     9        (WebCore::TaskDispatcher<Timer>::sharedLock):
     10
    1112020-04-26  Peng Liu  <peng.liu6@apple.com>
    212
  • trunk/Source/WebCore/platform/GenericTaskQueue.cpp

    r237378 r260731  
    6464Lock& TaskDispatcher<Timer>::sharedLock()
    6565{
    66     static NeverDestroyed<Lock> lock;
     66    static Lock lock;
    6767    return lock;
    6868}
Note: See TracChangeset for help on using the changeset viewer.