Changeset 25541 in webkit for trunk/JavaScriptCore/kjs/math_object.cpp
- Timestamp:
- Sep 13, 2007, 11:52:29 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/math_object.cpp
r23930 r25541 116 116 // ------------------------------ MathObjectImp -------------------------------- 117 117 118 static bool randomSeeded = false;118 static bool didInitRandom; 119 119 120 120 MathFuncImp::MathFuncImp(ExecState* exec, int i, int l, const Identifier& name) … … 206 206 break; 207 207 case MathObjectImp::Random: 208 if (! randomSeeded) {209 srand(static_cast<unsigned>(time(0)));210 randomSeeded= true;208 if (!didInitRandom) { 209 wtf_random_init(); 210 didInitRandom = true; 211 211 } 212 result = (double)rand() / RAND_MAX;212 result = wtf_random(); 213 213 break; 214 214 case MathObjectImp::Round:
Note:
See TracChangeset
for help on using the changeset viewer.