diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chromium/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp b/chromium/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp index 8b6e3b31f76..2de8201d57f 100644 --- a/chromium/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp +++ b/chromium/third_party/WebKit/Source/wtf/CryptographicallyRandomNumber.cpp @@ -28,10 +28,11 @@ */ #include "config.h" -#include "CryptographicallyRandomNumber.h" +#include "wtf/CryptographicallyRandomNumber.h" -#include "StdLibExtras.h" -#include "ThreadingPrimitives.h" +#include "wtf/StdLibExtras.h" +#include "wtf/Threading.h" +#include "wtf/ThreadingPrimitives.h" namespace WTF { @@ -164,8 +165,8 @@ void ARC4RandomNumberGenerator::randomValues(void* buffer, size_t length) ARC4RandomNumberGenerator& sharedRandomNumberGenerator() { - DEFINE_STATIC_LOCAL(ARC4RandomNumberGenerator, randomNumberGenerator, ()); - return randomNumberGenerator; + AtomicallyInitializedStatic(ARC4RandomNumberGenerator*, randomNumberGenerator = new ARC4RandomNumberGenerator); + return *randomNumberGenerator; } } |