diff options
Diffstat (limited to 'JavaScriptCore/runtime/InitializeThreading.cpp')
| -rw-r--r-- | JavaScriptCore/runtime/InitializeThreading.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/JavaScriptCore/runtime/InitializeThreading.cpp b/JavaScriptCore/runtime/InitializeThreading.cpp index 2605a9a..08dddc1 100644 --- a/JavaScriptCore/runtime/InitializeThreading.cpp +++ b/JavaScriptCore/runtime/InitializeThreading.cpp @@ -36,6 +36,7 @@ #include "UString.h" #include <wtf/DateMath.h> #include <wtf/Threading.h> +#include <wtf/WTFThreadData.h> using namespace WTF; @@ -47,12 +48,17 @@ static pthread_once_t initializeThreadingKeyOnce = PTHREAD_ONCE_INIT; static void initializeThreadingOnce() { + // StringImpl::empty() does not construct its static string in a threadsafe fashion, + // so ensure it has been initialized from here. + StringImpl::empty(); + WTF::initializeThreading(); - initializeUString(); + wtfThreadData(); JSGlobalData::storeVPtrs(); #if ENABLE(JSC_MULTIPLE_THREADS) s_dtoaP5Mutex = new Mutex; initializeDates(); + RegisterFile::initializeThreading(); #endif } |
