Ignore:
Timestamp:
Apr 1, 2008, 11:38:32 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin.

Make MathExtras.h thread safe.

  • kjs/math_object.cpp: (KJS::mathProtoFuncRandom): If threading is enabled, rely on initializeThreading to call wtf_random_init().
  • wtf/Threading.h:
  • wtf/ThreadingGtk.cpp: (WTF::initializeThreading):
  • wtf/ThreadingNone.cpp: (WTF::initializeThreading):
  • wtf/ThreadingPthreads.cpp: (WTF::initializeThreading):
  • wtf/ThreadingWin.cpp: (WTF::initializeThreading): Call wtf_random_init(); made the function non-inline to avoid having to include too many headers in Threading.h.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/ThreadingGtk.cpp

    r30851 r31560  
    3131#include "Threading.h"
    3232
    33 #include "HashMap.h"
     33#include <wtf/HashMap.h>
     34#include <wtf/MathExtras.h>
    3435
    3536#include <glib.h>
     
    4546        ASSERT(!atomicallyInitializedStaticMutex);
    4647        atomicallyInitializedStaticMutex = new Mutex;
     48        wtf_random_init();
    4749    }
    4850    ASSERT(g_thread_supported());
Note: See TracChangeset for help on using the changeset viewer.