X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/4e4e5a6f2694187498445a6ac6f1634ce8141119..14957cd040308e3eeec43d26bae5d76da13fcd85:/runtime/InitializeThreading.cpp?ds=inline diff --git a/runtime/InitializeThreading.cpp b/runtime/InitializeThreading.cpp index 51d43ee..27611b7 100644 --- a/runtime/InitializeThreading.cpp +++ b/runtime/InitializeThreading.cpp @@ -29,7 +29,7 @@ #include "config.h" #include "InitializeThreading.h" -#include "Collector.h" +#include "Heap.h" #include "dtoa.h" #include "Identifier.h" #include "JSGlobalObject.h" @@ -48,13 +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(); wtfThreadData(); - initializeUString(); JSGlobalData::storeVPtrs(); #if ENABLE(JSC_MULTIPLE_THREADS) s_dtoaP5Mutex = new Mutex; initializeDates(); + RegisterFile::initializeThreading(); #endif }