Commit 2764901b authored by darin@apple.com's avatar darin@apple.com

Try to fix Windows build.

* wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
of conditional includes.
(WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
(WTF::createThreadInternal): Tweaked #if to not need separate macro.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d70045e8
2011-01-04 Darin Adler <darin@apple.com>
Try to fix Windows build.
* wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
of conditional includes.
(WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
(WTF::createThreadInternal): Tweaked #if to not need separate macro.
2011-01-04 Daniel Bates <dbates@rim.com>
Reviewed by Adam Roben.
......
......@@ -88,23 +88,25 @@
#include "MainThread.h"
#include "ThreadFunctionInvocation.h"
#include <windows.h>
#include <wtf/CurrentTime.h>
#include <wtf/HashMap.h>
#include <wtf/MathExtras.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/RandomNumberSeed.h>
#if !USE(PTHREADS) && OS(WINDOWS)
#include "ThreadSpecific.h"
#endif
#if !OS(WINCE)
#include <process.h>
#endif
#if HAVE(ERRNO_H)
#include <errno.h>
#else
#define NO_ERRNO
#endif
#include <windows.h>
#include <wtf/CurrentTime.h>
#include <wtf/HashMap.h>
#include <wtf/MathExtras.h>
#include <wtf/OwnPtr.h>
#include <wtf/RandomNumberSeed.h>
namespace WTF {
......@@ -192,7 +194,7 @@ static void clearThreadHandleForIdentifier(ThreadIdentifier id)
static unsigned __stdcall wtfThreadEntryPoint(void* param)
{
OwnPtr<ThreadFunctionInvocation> invocation = adoptPtr(static_cast<ThreadFunctionInvocation*>(param));
void* result = invocation->function(invocation.data);
void* result = invocation->function(invocation->data);
#if !USE(PTHREADS) && OS(WINDOWS)
// Do the TLS cleanup.
......@@ -217,7 +219,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
if (!threadHandle) {
#if OS(WINCE)
LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, ::GetLastError());
#elif defined(NO_ERRNO)
#elif !HAVE(ERRNO_H)
LOG_ERROR("Failed to create thread at entry point %p with data %p.", entryPoint, data);
#else
LOG_ERROR("Failed to create thread at entry point %p with data %p: %ld", entryPoint, data, errno);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment