| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. | 4 * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 void unlockAtomicallyInitializedStaticMutex() { | 143 void unlockAtomicallyInitializedStaticMutex() { |
| 144 atomicallyInitializedStaticMutex->unlock(); | 144 atomicallyInitializedStaticMutex->unlock(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void initializeThreading() { | 147 void initializeThreading() { |
| 148 // This should only be called once. | 148 // This should only be called once. |
| 149 DCHECK(!atomicallyInitializedStaticMutex); | 149 DCHECK(!atomicallyInitializedStaticMutex); |
| 150 | 150 |
| 151 WTFThreadData::initialize(); |
| 152 |
| 151 atomicallyInitializedStaticMutex = new Mutex; | 153 atomicallyInitializedStaticMutex = new Mutex; |
| 152 wtfThreadData(); | |
| 153 initializeDates(); | 154 initializeDates(); |
| 154 // Force initialization of static DoubleToStringConverter converter variable | 155 // Force initialization of static DoubleToStringConverter converter variable |
| 155 // inside EcmaScriptConverter function while we are in single thread mode. | 156 // inside EcmaScriptConverter function while we are in single thread mode. |
| 156 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); | 157 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); |
| 157 } | 158 } |
| 158 | 159 |
| 159 ThreadIdentifier currentThread() { | 160 ThreadIdentifier currentThread() { |
| 160 return wtfThreadData().threadId(); | 161 return wtfThreadData().threadId(); |
| 161 } | 162 } |
| 162 | 163 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 } | 407 } |
| 407 | 408 |
| 408 void willCreateThread() { | 409 void willCreateThread() { |
| 409 s_threadCreated = true; | 410 s_threadCreated = true; |
| 410 } | 411 } |
| 411 #endif | 412 #endif |
| 412 | 413 |
| 413 } // namespace WTF | 414 } // namespace WTF |
| 414 | 415 |
| 415 #endif // OS(WIN) | 416 #endif // OS(WIN) |
| OLD | NEW |