| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) | 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) |
| 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void initializeThreading() | 70 void initializeThreading() |
| 71 { | 71 { |
| 72 // This should only be called once. | 72 // This should only be called once. |
| 73 ASSERT(!atomicallyInitializedStaticMutex); | 73 ASSERT(!atomicallyInitializedStaticMutex); |
| 74 | 74 |
| 75 // StringImpl::empty() does not construct its static string in a threadsafe
fashion, | 75 // StringImpl::empty() does not construct its static string in a threadsafe
fashion, |
| 76 // so ensure it has been initialized from here. | 76 // so ensure it has been initialized from here. |
| 77 StringImpl::empty(); | 77 StringImpl::empty(); |
| 78 StringImpl::empty16Bit(); | 78 StringImpl::empty16Bit(); |
| 79 atomicallyInitializedStaticMutex = new Mutex; | 79 atomicallyInitializedStaticMutex = new Mutex; |
| 80 wtfThreadData(); | 80 WTFThreadData::createData(); |
| 81 s_dtoaP5Mutex = new Mutex; | 81 s_dtoaP5Mutex = new Mutex; |
| 82 initializeDates(); | 82 initializeDates(); |
| 83 // Force initialization of static DoubleToStringConverter converter variable | 83 // Force initialization of static DoubleToStringConverter converter variable |
| 84 // inside EcmaScriptConverter function while we are in single thread mode. | 84 // inside EcmaScriptConverter function while we are in single thread mode. |
| 85 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); | 85 double_conversion::DoubleToStringConverter::EcmaScriptConverter(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void lockAtomicallyInitializedStaticMutex() | 88 void lockAtomicallyInitializedStaticMutex() |
| 89 { | 89 { |
| 90 ASSERT(atomicallyInitializedStaticMutex); | 90 ASSERT(atomicallyInitializedStaticMutex); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 void willCreateThread() | 262 void willCreateThread() |
| 263 { | 263 { |
| 264 s_threadCreated = true; | 264 s_threadCreated = true; |
| 265 } | 265 } |
| 266 #endif | 266 #endif |
| 267 | 267 |
| 268 } // namespace WTF | 268 } // namespace WTF |
| 269 | 269 |
| 270 #endif // USE(PTHREADS) | 270 #endif // USE(PTHREADS) |
| OLD | NEW |