Changeset 200420 in webkit


Ignore:
Timestamp:
May 4, 2016 10:20:31 AM (8 years ago)
Author:
peavo@outlook.com
Message:

[Win] Use NeverDestroyed template.
https://bugs.webkit.org/show_bug.cgi?id=157345

Reviewed by Darin Adler.

  • wtf/ThreadingWin.cpp:

(WTF::threadMapMutex):
(WTF::threadMap):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r200416 r200420  
     12016-05-04  Per Arne Vollan  <peavo@outlook.com>
     2
     3        [Win] Use NeverDestroyed template.
     4        https://bugs.webkit.org/show_bug.cgi?id=157345
     5
     6        Reviewed by Darin Adler.
     7
     8        * wtf/ThreadingWin.cpp:
     9        (WTF::threadMapMutex):
     10        (WTF::threadMap):
     11
    1122016-05-04  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WTF/wtf/ThreadingWin.cpp

    r199762 r200420  
    100100#include <wtf/HashMap.h>
    101101#include <wtf/MathExtras.h>
     102#include <wtf/NeverDestroyed.h>
    102103#include <wtf/RandomNumberSeed.h>
    103104#include <wtf/WTFThreadData.h>
     
    142143static Mutex& threadMapMutex()
    143144{
    144     static Mutex mutex;
     145    static NeverDestroyed<Mutex> mutex;
    145146    return mutex;
    146147}
     
    167168static HashMap<DWORD, HANDLE>& threadMap()
    168169{
    169     static HashMap<DWORD, HANDLE> map;
     170    static NeverDestroyed<HashMap<DWORD, HANDLE>> map;
    170171    return map;
    171172}
Note: See TracChangeset for help on using the changeset viewer.