| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 void initializeThreading() | 132 void initializeThreading() |
| 133 { | 133 { |
| 134 // This should only be called once. | 134 // This should only be called once. |
| 135 ASSERT(!atomicallyInitializedStaticMutex); | 135 ASSERT(!atomicallyInitializedStaticMutex); |
| 136 | 136 |
| 137 // StringImpl::empty() does not construct its static string in a threadsafe
fashion, | 137 // StringImpl::empty() does not construct its static string in a threadsafe
fashion, |
| 138 // so ensure it has been initialized from here. | 138 // so ensure it has been initialized from here. |
| 139 StringImpl::empty(); | 139 StringImpl::empty(); |
| 140 StringImpl::empty16Bit(); | 140 StringImpl::empty16Bit(); |
| 141 atomicallyInitializedStaticMutex = new Mutex; | 141 atomicallyInitializedStaticMutex = new Mutex; |
| 142 wtfThreadData(); | 142 WTFThreadData::createData(); |
| 143 s_dtoaP5Mutex = new Mutex; | 143 s_dtoaP5Mutex = new Mutex; |
| 144 initializeDates(); | 144 initializeDates(); |
| 145 // Force initialization of static DoubleToStringConverter converter variable | 145 // Force initialization of static DoubleToStringConverter converter variable |
| 146 // inside EcmaScriptConverter function while we are in single thread mode. | 146 // inside EcmaScriptConverter function while we are in single thread mode. |
| 147 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); | 147 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 ThreadIdentifier currentThread() | 150 ThreadIdentifier currentThread() |
| 151 { | 151 { |
| 152 return static_cast<ThreadIdentifier>(GetCurrentThreadId()); | 152 return static_cast<ThreadIdentifier>(GetCurrentThreadId()); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 404 |
| 405 void willCreateThread() | 405 void willCreateThread() |
| 406 { | 406 { |
| 407 s_threadCreated = true; | 407 s_threadCreated = true; |
| 408 } | 408 } |
| 409 #endif | 409 #endif |
| 410 | 410 |
| 411 } // namespace WTF | 411 } // namespace WTF |
| 412 | 412 |
| 413 #endif // OS(WIN) | 413 #endif // OS(WIN) |
| OLD | NEW |