| Index: third_party/WebKit/Source/wtf/Threading.h
|
| diff --git a/third_party/WebKit/Source/wtf/Threading.h b/third_party/WebKit/Source/wtf/Threading.h
|
| index f8555f2fa63ba67fa37a00022a87e89287313af2..1aea49fa7e92c0e4618540038bb7ac7ad120c7e8 100644
|
| --- a/third_party/WebKit/Source/wtf/Threading.h
|
| +++ b/third_party/WebKit/Source/wtf/Threading.h
|
| @@ -39,18 +39,18 @@
|
| // by some toolchains. Make use of double-checked locking to reduce overhead.
|
| // Note that this uses system-wide default lock, and cannot be used before
|
| // WTF::initializeThreading() is called.
|
| -#define DEFINE_THREAD_SAFE_STATIC_LOCAL(T, name, initializer) \
|
| - /* Init to nullptr is thread-safe on all implementations. */ \
|
| - static void* name##Pointer = nullptr; \
|
| - if (!WTF::acquireLoad(&name##Pointer)) { \
|
| - WTF::lockAtomicallyInitializedStaticMutex(); \
|
| - if (!WTF::acquireLoad(&name##Pointer)) { \
|
| - std::remove_const<T>::type* initializerResult = initializer; \
|
| - WTF::releaseStore(&name##Pointer, initializerResult); \
|
| - } \
|
| - WTF::unlockAtomicallyInitializedStaticMutex(); \
|
| - } \
|
| - T& name = *static_cast<T*>(name##Pointer)
|
| +#define DEFINE_THREAD_SAFE_STATIC_LOCAL(T, name, initializer) \
|
| + /* Init to nullptr is thread-safe on all implementations. */ \
|
| + static void* name##Pointer = nullptr; \
|
| + if (!WTF::acquireLoad(&name##Pointer)) { \
|
| + WTF::lockAtomicallyInitializedStaticMutex(); \
|
| + if (!WTF::acquireLoad(&name##Pointer)) { \
|
| + std::remove_const<T>::type* initializerResult = initializer; \
|
| + WTF::releaseStore(&name##Pointer, initializerResult); \
|
| + } \
|
| + WTF::unlockAtomicallyInitializedStaticMutex(); \
|
| + } \
|
| + T& name = *static_cast<T*>(name##Pointer)
|
|
|
| namespace WTF {
|
|
|
| @@ -71,9 +71,9 @@ WTF_EXPORT bool isBeforeThreadCreated();
|
| WTF_EXPORT void willCreateThread();
|
| #endif
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|
| using WTF::ThreadIdentifier;
|
| using WTF::currentThread;
|
|
|
| -#endif // Threading_h
|
| +#endif // Threading_h
|
|
|