Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Misceallenous fixes for the Windows Phone 8 port

  • Loading branch information...
commit 9642bb734e43e8672333d6daa584aa74ee9602bf 1 parent 03b60b0
Martin Robinson mrobinson authored
3  Source/JavaScriptCore/runtime/InitializeThreading.cpp
View
@@ -94,6 +94,9 @@ void initializeThreading()
{
#if OS(DARWIN)
pthread_once(&initializeThreadingKeyOnce, initializeThreadingOnce);
+#elif USE(STDTHREAD)
+ static std::once_flag initializeThreadingOnceFlag;
+ std::call_once(initializeThreadingOnceFlag, initializeThreadingOnce);
#else
static bool initializedThreading = false;
if (!initializedThreading) {
4 Source/WTF/wtf/CurrentTime.cpp
View
@@ -207,7 +207,7 @@ double currentTime()
lastTime = lowResUTCTime();
lastTickCount = GetTickCount64();
init = true;
- return lastTime;
+ return lastTime / 1000.0;
}
ULONGLONG tickCountNow = GetTickCount64();
@@ -217,7 +217,7 @@ double currentTime()
lastTime = timeNow;
lastTickCount = tickCountNow;
}
- return timeNow;
+ return timeNow / 1000.0;
}
#else
11 Source/WTF/wtf/ThreadingStdThread.cpp
View
@@ -34,6 +34,10 @@
#if USE(STDTHREAD)
+#include "DateMath.h"
+#include "dtoa.h"
+#include "dtoa/cached-powers.h"
+#include "RandomNumberSeed.h"
#include "StdLibExtras.h"
#include "CurrentTime.h"
#include "ThreadFunctionInvocation.h"
@@ -154,18 +158,19 @@ void initializeThreading()
if (atomicallyInitializedStaticMutex)
return;
atomicallyInitializedStaticMutex = new Mutex;
+ threadMapMutex();
+
+ WTF::double_conversion::initialize();
// StringImpl::empty() does not construct its static string in a threadsafe fashion,
// so ensure it has been initialized from here.
StringImpl::empty();
+ atomicallyInitializedStaticMutex = new Mutex;
threadMapMutex();
- /*
- WTF::double_conversion::initialize();
initializeRandomNumberGenerator();
StackStats::initialize();
wtfThreadData();
s_dtoaP5Mutex = new Mutex;
initializeDates();
- */
}
void lockAtomicallyInitializedStaticMutex()
Please sign in to comment.
Something went wrong with that request. Please try again.