In runtime/InitializeThreading.cpp, the non-pthread version is not fully equivalent to the pthread version. We can use the ThreadingOnce class here.
Created attachment 218416 [details] Patch
Comment on attachment 218416 [details] Patch r=me
Comment on attachment 218416 [details] Patch Clearing flags on attachment: 218416 Committed r160116: <http://trac.webkit.org/changeset/160116>
All reviewed patches have been landed. Closing bug.
This is wrong. Please roll it out. It is incorrect for WTF::ThreadingOnce to be declared static. Since we build without thread-safe statics, that declaration is not thread-safe. Also, if statics were thread-safe, there would be no need for WTF::ThreadingOnce to contain any logic or data members: the constructor could just call the provided function, and you could rely on the compiler to ensure that the constructor was called only once. Therefore, this patch is either meaningless or wrong, depending on your platform.
Re-opened since this is blocked by bug 125264
We can switch to "std::call_once" when we move to VS2013.
(In reply to comment #5) > This is wrong. Please roll it out. > > It is incorrect for WTF::ThreadingOnce to be declared static. Since we build without thread-safe statics, that declaration is not thread-safe. > > Also, if statics were thread-safe, there would be no need for WTF::ThreadingOnce to contain any logic or data members: the constructor could just call the provided function, and you could rely on the compiler to ensure that the constructor was called only once. > > Therefore, this patch is either meaningless or wrong, depending on your platform. Thanks for catching this. A couple of other places needs to be changed as well, I've made bug 125305 for this. Sorry for the inconvienience.
This is now fixed by using std::call_once.