X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/ba379fdc102753d6be2c4d937058fe40257329fe..14957cd040308e3eeec43d26bae5d76da13fcd85:/wtf/win/MainThreadWin.cpp diff --git a/wtf/win/MainThreadWin.cpp b/wtf/win/MainThreadWin.cpp index 9f1eaa6..ee3a273 100644 --- a/wtf/win/MainThreadWin.cpp +++ b/wtf/win/MainThreadWin.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,7 +32,7 @@ #include "Assertions.h" #include "Threading.h" -#if !PLATFORM(WINCE) +#if !OS(WINCE) #include #endif @@ -55,16 +56,29 @@ void initializeMainThreadPlatform() if (threadingWindowHandle) return; + HWND hWndParent = 0; +#if OS(WINCE) + WNDCLASS wcex; + memset(&wcex, 0, sizeof(WNDCLASS)); +#else WNDCLASSEX wcex; memset(&wcex, 0, sizeof(WNDCLASSEX)); wcex.cbSize = sizeof(WNDCLASSEX); +#endif wcex.lpfnWndProc = ThreadingWindowWndProc; wcex.lpszClassName = kThreadingWindowClassName; +#if OS(WINCE) + RegisterClass(&wcex); +#else RegisterClassEx(&wcex); + hWndParent = HWND_MESSAGE; +#endif threadingWindowHandle = CreateWindow(kThreadingWindowClassName, 0, 0, - CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, 0, 0); + CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, hWndParent, 0, 0, 0); threadingFiredMessage = RegisterWindowMessage(L"com.apple.WebKit.MainThreadFired"); + + initializeCurrentThreadInternal("Main Thread"); } void scheduleDispatchFunctionsOnMainThread()