diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp index 1d4185c..49de59e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.cpp @@ -49,13 +49,14 @@ static void* threadEntryPoint(void* contextData) { NewThreadContext* context = reinterpret_cast<NewThreadContext*>(contextData); - setThreadNameInternal(context->name); - - // Block until our creating thread has completed any extra setup work. + // Block until our creating thread has completed any extra setup work, including + // establishing ThreadIdentifier. { MutexLocker locker(context->creationMutex); } + initializeCurrentThreadInternal(context->name); + // Grab the info that we need out of the context, then deallocate it. ThreadFunction entryPoint = context->entryPoint; void* data = context->data; @@ -75,7 +76,7 @@ ThreadIdentifier createThread(ThreadFunction entryPoint, void* data, const char* NewThreadContext* context = new NewThreadContext(entryPoint, data, name); - // Prevent the thread body from executing until we've established the thread identifier + // Prevent the thread body from executing until we've established the thread identifier. MutexLocker locker(context->creationMutex); return createThreadInternal(threadEntryPoint, context, name); |