Commit 614f946c authored by aroben@apple.com's avatar aroben@apple.com

Move callOnMainThread to WTF

JavaScriptCore:

        Move callOnMainThread to WTF

        Reviewed by Alexey Proskuryakov.

        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        Added new files.

        * wtf/MainThread.cpp:
        * wtf/MainThread.h:
        * wtf/gtk/MainThreadGtk.cpp:
        * wtf/mac/MainThreadMac.mm:
        * wtf/qt/MainThreadQt.cpp:
        * wtf/win/MainThreadWin.cpp:
        * wtf/wx/MainThreadWx.cpp:
        Moved here from WebCore/platform. Replaced all instances of "WebCore"
        with "WTF".

        * kjs/bool_object.cpp: Touched to force JavaScriptCore.vcproj to
        build.
        to the WTF namespace.
        * wtf/ThreadingWin.cpp:
        (WTF::initializeThreading): Call initializeMainThread.

WebCore:

        Move callOnMainThread to WTF

        Reviewed by Alexey Proskuryakov.

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCoreSources.bkl:
        Removed MainThread files.

        * bindings/js/JSCustomSQLTransactionCallback.cpp:
        * loader/icon/IconDatabase.cpp:
        (WebCore::iconDatabase):
        * storage/Database.cpp:
        (WebCore::Database::Database):
        * storage/DatabaseTracker.cpp:
        Updated #includes and replaced calls to
        WebCore::initializeThreadingAndMainThread with calls to
        KJS::initializeThreading.

        * platform/MainThread.cpp: Removed.
        * platform/MainThread.h: Removed.
        * platform/gtk/MainThreadGtk.cpp: Removed.
        * platform/mac/MainThreadMac.mm: Removed.
        * platform/qt/MainThreadQt.cpp: Removed.
        * platform/win/MainThreadWin.cpp: Removed.
        * platform/wx/MainThreadWx.cpp: Removed.

WebKit/gtk:

        Move callOnMainThread to WTF

        Reviewed by Alexey Proskuryakov.

        * webkit/webkitprivate.cpp: Updated #include.
        (webkit_init): Changed to call KJS::initializeThreading.

WebKit/win:

        Move callOnMainThread to WTF

        Reviewed by Alexey Proskuryakov.

        * WebIconDatabase.cpp: Updated #include


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7e34adfb
2008-04-08 Adam Roben <aroben@apple.com>
Move callOnMainThread to WTF
Reviewed by Alexey Proskuryakov.
* GNUmakefile.am:
* JavaScriptCore.pri:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* JavaScriptCoreSources.bkl:
Added new files.
* wtf/MainThread.cpp:
* wtf/MainThread.h:
* wtf/gtk/MainThreadGtk.cpp:
* wtf/mac/MainThreadMac.mm:
* wtf/qt/MainThreadQt.cpp:
* wtf/win/MainThreadWin.cpp:
* wtf/wx/MainThreadWx.cpp:
Moved here from WebCore/platform. Replaced all instances of "WebCore"
with "WTF".
* kjs/bool_object.cpp: Touched to force JavaScriptCore.vcproj to
build.
to the WTF namespace.
* wtf/ThreadingWin.cpp:
(WTF::initializeThreading): Call initializeMainThread.
2008-04-07 Brady Eidson <beidson@apple.com> 2008-04-07 Brady Eidson <beidson@apple.com>
Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project
......
...@@ -49,7 +49,9 @@ javascriptcore_sources += \ ...@@ -49,7 +49,9 @@ javascriptcore_sources += \
JavaScriptCore/pcre/pcre_xclass.cpp \ JavaScriptCore/pcre/pcre_xclass.cpp \
JavaScriptCore/wtf/Assertions.cpp \ JavaScriptCore/wtf/Assertions.cpp \
JavaScriptCore/wtf/HashTable.cpp \ JavaScriptCore/wtf/HashTable.cpp \
JavaScriptCore/wtf/MainThread.cpp \
JavaScriptCore/wtf/ThreadingGtk.cpp \ JavaScriptCore/wtf/ThreadingGtk.cpp \
JavaScriptCore/wtf/gtk/MainThreadGtk.cpp \
JavaScriptCore/wtf/unicode/CollatorDefault.cpp \ JavaScriptCore/wtf/unicode/CollatorDefault.cpp \
JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp \ JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp \
JavaScriptCore/wtf/unicode/UTF8.cpp JavaScriptCore/wtf/unicode/UTF8.cpp
......
...@@ -35,6 +35,7 @@ KJSBISON += \ ...@@ -35,6 +35,7 @@ KJSBISON += \
SOURCES += \ SOURCES += \
wtf/Assertions.cpp \ wtf/Assertions.cpp \
wtf/HashTable.cpp \ wtf/HashTable.cpp \
wtf/MainThread.cpp \
wtf/unicode/CollatorDefault.cpp \ wtf/unicode/CollatorDefault.cpp \
wtf/unicode/icu/CollatorICU.cpp \ wtf/unicode/icu/CollatorICU.cpp \
wtf/unicode/UTF8.cpp \ wtf/unicode/UTF8.cpp \
...@@ -104,10 +105,12 @@ SOURCES += \ ...@@ -104,10 +105,12 @@ SOURCES += \
} }
gtk-port:SOURCES += \ gtk-port:SOURCES += \
wtf/ThreadingGtk.cpp wtf/ThreadingGtk.cpp \
wtf/gtk/MainThreadGtk.cpp
!gtk-port:SOURCES += \ !gtk-port:SOURCES += \
wtf/ThreadingNone.cpp wtf/ThreadingNone.cpp \
wtf/qt/MainThreadQt.cpp
!CONFIG(QTDIR_build) { !CONFIG(QTDIR_build) {
defineTest(addExtraCompiler) { defineTest(addExtraCompiler) {
......
...@@ -203,6 +203,14 @@ ...@@ -203,6 +203,14 @@
<References> <References>
</References> </References>
<Files> <Files>
<Filter
Name="win"
>
<File
RelativePath="..\..\wtf\win\MainThreadWin.cpp"
>
</File>
</Filter>
<File <File
RelativePath="..\..\wtf\AlwaysInline.h" RelativePath="..\..\wtf\AlwaysInline.h"
> >
...@@ -295,6 +303,14 @@ ...@@ -295,6 +303,14 @@
RelativePath="..\..\wtf\Locker.h" RelativePath="..\..\wtf\Locker.h"
> >
</File> </File>
<File
RelativePath="..\..\wtf\MainThread.cpp"
>
</File>
<File
RelativePath="..\..\wtf\MainThread.h"
>
</File>
<File <File
RelativePath="..\..\wtf\MathExtras.h" RelativePath="..\..\wtf\MathExtras.h"
> >
......
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
/* End PBXAggregateTarget section */ /* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
06D358B20DAADA93003B174E /* MainThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 06D358A30DAAD9C4003B174E /* MainThread.h */; settings = {ATTRIBUTES = (Private, ); }; };
06D358B30DAADAA4003B174E /* MainThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 06D358A20DAAD9C4003B174E /* MainThread.cpp */; };
06D358B40DAADAAA003B174E /* MainThreadMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 06D358A10DAAD9C4003B174E /* MainThreadMac.mm */; };
141211310A48794D00480255 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; }; 141211310A48794D00480255 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
141211340A48795800480255 /* minidom.c in Sources */ = {isa = PBXBuildFile; fileRef = 141211020A48780900480255 /* minidom.c */; }; 141211340A48795800480255 /* minidom.c in Sources */ = {isa = PBXBuildFile; fileRef = 141211020A48780900480255 /* minidom.c */; };
1419D32D0CEA7CDE00FF507A /* RefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 1419D32C0CEA7CDE00FF507A /* RefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1419D32D0CEA7CDE00FF507A /* RefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 1419D32C0CEA7CDE00FF507A /* RefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; };
...@@ -331,6 +334,9 @@ ...@@ -331,6 +334,9 @@
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
06D358A10DAAD9C4003B174E /* MainThreadMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MainThreadMac.mm; sourceTree = "<group>"; };
06D358A20DAAD9C4003B174E /* MainThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainThread.cpp; sourceTree = "<group>"; };
06D358A30DAAD9C4003B174E /* MainThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainThread.h; sourceTree = "<group>"; };
141211020A48780900480255 /* minidom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = minidom.c; sourceTree = "<group>"; }; 141211020A48780900480255 /* minidom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = minidom.c; sourceTree = "<group>"; };
1412110D0A48788700480255 /* minidom.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = minidom.js; sourceTree = "<group>"; }; 1412110D0A48788700480255 /* minidom.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = minidom.js; sourceTree = "<group>"; };
141211200A48793C00480255 /* minidom */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = minidom; sourceTree = BUILT_PRODUCTS_DIR; }; 141211200A48793C00480255 /* minidom */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = minidom; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -613,6 +619,14 @@ ...@@ -613,6 +619,14 @@
tabWidth = 4; tabWidth = 4;
usesTabs = 0; usesTabs = 0;
}; };
06D358A00DAAD9C4003B174E /* mac */ = {
isa = PBXGroup;
children = (
06D358A10DAAD9C4003B174E /* MainThreadMac.mm */,
);
path = mac;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* JavaScriptCore */ = { 0867D691FE84028FC02AAC07 /* JavaScriptCore */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -748,6 +762,7 @@ ...@@ -748,6 +762,7 @@
65162EF108E6A21C007556CD /* wtf */ = { 65162EF108E6A21C007556CD /* wtf */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
06D358A00DAAD9C4003B174E /* mac */,
93AA4F770957251F0084B3A7 /* AlwaysInline.h */, 93AA4F770957251F0084B3A7 /* AlwaysInline.h */,
938C4F690CA06BC700D9310A /* ASCIICType.h */, 938C4F690CA06BC700D9310A /* ASCIICType.h */,
65E217B808E7EECC0023E5F6 /* Assertions.cpp */, 65E217B808E7EECC0023E5F6 /* Assertions.cpp */,
...@@ -769,6 +784,8 @@ ...@@ -769,6 +784,8 @@
657EB7450B708F540063461B /* ListHashSet.h */, 657EB7450B708F540063461B /* ListHashSet.h */,
148A1626095D16BB00666D0D /* ListRefPtr.h */, 148A1626095D16BB00666D0D /* ListRefPtr.h */,
E1EE79270D6C964500FEA3BA /* Locker.h */, E1EE79270D6C964500FEA3BA /* Locker.h */,
06D358A20DAAD9C4003B174E /* MainThread.cpp */,
06D358A30DAAD9C4003B174E /* MainThread.h */,
5DBD18AF0C5401A700C15EAE /* MallocZoneSupport.h */, 5DBD18AF0C5401A700C15EAE /* MallocZoneSupport.h */,
BCF6553B0A2048DE0038A194 /* MathExtras.h */, BCF6553B0A2048DE0038A194 /* MathExtras.h */,
E1EE798B0D6CA53D00FEA3BA /* MessageQueue.h */, E1EE798B0D6CA53D00FEA3BA /* MessageQueue.h */,
...@@ -1100,6 +1117,7 @@ ...@@ -1100,6 +1117,7 @@
E1EE79280D6C964500FEA3BA /* Locker.h in Headers */, E1EE79280D6C964500FEA3BA /* Locker.h in Headers */,
E1A862AB0D7EBB7D001EC6AA /* Collator.h in Headers */, E1A862AB0D7EBB7D001EC6AA /* Collator.h in Headers */,
E17863400D9BEC0000D74E75 /* InitializeThreading.h in Headers */, E17863400D9BEC0000D74E75 /* InitializeThreading.h in Headers */,
06D358B20DAADA93003B174E /* MainThread.h in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1353,6 +1371,8 @@ ...@@ -1353,6 +1371,8 @@
E1A862A90D7EBB76001EC6AA /* CollatorICU.cpp in Sources */, E1A862A90D7EBB76001EC6AA /* CollatorICU.cpp in Sources */,
E1A862D60D7F2B5C001EC6AA /* CollatorDefault.cpp in Sources */, E1A862D60D7F2B5C001EC6AA /* CollatorDefault.cpp in Sources */,
E178636D0D9BEEC300D74E75 /* InitializeThreading.cpp in Sources */, E178636D0D9BEEC300D74E75 /* InitializeThreading.cpp in Sources */,
06D358B30DAADAA4003B174E /* MainThread.cpp in Sources */,
06D358B40DAADAAA003B174E /* MainThreadMac.mm in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -99,8 +99,10 @@ Source files for JSCore. ...@@ -99,8 +99,10 @@ Source files for JSCore.
wtf/Assertions.cpp wtf/Assertions.cpp
wtf/FastMalloc.cpp wtf/FastMalloc.cpp
wtf/HashTable.cpp wtf/HashTable.cpp
wtf/MainThread.cpp
wtf/TCSystemAlloc.cpp wtf/TCSystemAlloc.cpp
wtf/ThreadingNone.cpp wtf/ThreadingNone.cpp
wtf/wx/MainThreadWx.cpp
wtf/unicode/CollatorDefault.cpp wtf/unicode/CollatorDefault.cpp
wtf/unicode/icu/CollatorICU.cpp wtf/unicode/icu/CollatorICU.cpp
wtf/unicode/UTF8.cpp wtf/unicode/UTF8.cpp
......
...@@ -93,7 +93,6 @@ BooleanObjectImp::BooleanObjectImp(ExecState* exec, FunctionPrototype* functionP ...@@ -93,7 +93,6 @@ BooleanObjectImp::BooleanObjectImp(ExecState* exec, FunctionPrototype* functionP
putDirect(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum); putDirect(exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
} }
bool BooleanObjectImp::implementsConstruct() const bool BooleanObjectImp::implementsConstruct() const
{ {
return true; return true;
......
...@@ -29,11 +29,10 @@ ...@@ -29,11 +29,10 @@
#include "config.h" #include "config.h"
#include "MainThread.h" #include "MainThread.h"
#include "Logging.h" #include "Threading.h"
#include <wtf/Threading.h> #include "Vector.h"
#include <wtf/Vector.h>
namespace WebCore { namespace WTF {
struct FunctionWithContext { struct FunctionWithContext {
MainThreadFunction* function; MainThreadFunction* function;
...@@ -68,7 +67,6 @@ void dispatchFunctionsFromMainThread() ...@@ -68,7 +67,6 @@ void dispatchFunctionsFromMainThread()
queueCopy.swap(functionQueue()); queueCopy.swap(functionQueue());
} }
LOG(Threading, "Calling %u functions on the main thread", static_cast<unsigned>(queueCopy.size()));
for (unsigned i = 0; i < queueCopy.size(); ++i) for (unsigned i = 0; i < queueCopy.size(); ++i)
queueCopy[i].function(queueCopy[i].context); queueCopy[i].function(queueCopy[i].context);
} }
...@@ -96,4 +94,4 @@ void setMainThreadCallbacksPaused(bool paused) ...@@ -96,4 +94,4 @@ void setMainThreadCallbacksPaused(bool paused)
scheduleDispatchFunctionsOnMainThread(); scheduleDispatchFunctionsOnMainThread();
} }
} // namespace WebCore } // namespace WTF
...@@ -30,28 +30,24 @@ ...@@ -30,28 +30,24 @@
#ifndef MainThread_h #ifndef MainThread_h
#define MainThread_h #define MainThread_h
#include <kjs/InitializeThreading.h> namespace WTF {
namespace WebCore {
typedef void MainThreadFunction(void*); typedef void MainThreadFunction(void*);
void callOnMainThread(MainThreadFunction*, void* context); void callOnMainThread(MainThreadFunction*, void* context);
void setMainThreadCallbacksPaused(bool paused); void setMainThreadCallbacksPaused(bool paused);
void initializeThreadingAndMainThread(); #if PLATFORM(WIN)
void initializeMainThread();
#if !PLATFORM(WIN)
inline void initializeThreadingAndMainThread()
{
KJS::initializeThreading();
}
#endif #endif
// These functions are internal to the callOnMainThread implementation. // These functions are internal to the callOnMainThread implementation.
void dispatchFunctionsFromMainThread(); void dispatchFunctionsFromMainThread();
void scheduleDispatchFunctionsOnMainThread(); void scheduleDispatchFunctionsOnMainThread();
} // namespace WebCore } // namespace WTF
using WTF::callOnMainThread;
using WTF::setMainThreadCallbacksPaused;
#endif // MainThread_h #endif // MainThread_h
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
#include "config.h" #include "config.h"
#include "Threading.h" #include "Threading.h"
#include "MainThread.h"
#include <windows.h> #include <windows.h>
#include <wtf/HashMap.h> #include <wtf/HashMap.h>
#include <wtf/MathExtras.h> #include <wtf/MathExtras.h>
...@@ -78,6 +79,7 @@ void initializeThreading() ...@@ -78,6 +79,7 @@ void initializeThreading()
if (!atomicallyInitializedStaticMutex) { if (!atomicallyInitializedStaticMutex) {
atomicallyInitializedStaticMutex = new Mutex; atomicallyInitializedStaticMutex = new Mutex;
wtf_random_init(); wtf_random_init();
initializeMainThread();
mainThreadIdentifier = currentThread(); mainThreadIdentifier = currentThread();
} }
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <glib.h> #include <glib.h>
namespace WebCore { namespace WTF {
static gboolean timeoutFired(gpointer) static gboolean timeoutFired(gpointer)
{ {
......
...@@ -29,27 +29,29 @@ ...@@ -29,27 +29,29 @@
#import "config.h" #import "config.h"
#import "MainThread.h" #import "MainThread.h"
@interface WebCoreMainThreadCaller : NSObject { #import <Foundation/NSThread.h>
@interface WTFMainThreadCaller : NSObject {
} }
- (void)call; - (void)call;
@end @end
@implementation WebCoreMainThreadCaller @implementation WTFMainThreadCaller
- (void)call - (void)call
{ {
WebCore::dispatchFunctionsFromMainThread(); WTF::dispatchFunctionsFromMainThread();
} }
@end // implementation WebCoreMainThreadCaller @end // implementation WTFMainThreadCaller
namespace WebCore { namespace WTF {
void scheduleDispatchFunctionsOnMainThread() void scheduleDispatchFunctionsOnMainThread()
{ {
WebCoreMainThreadCaller *caller = [[WebCoreMainThreadCaller alloc] init]; WTFMainThreadCaller *caller = [[WTFMainThreadCaller alloc] init];
[caller performSelectorOnMainThread:@selector(call) withObject:nil waitUntilDone:NO]; [caller performSelectorOnMainThread:@selector(call) withObject:nil waitUntilDone:NO];
[caller release]; [caller release];
} }
} // namespace WebCore } // namespace WTF
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
namespace WebCore { namespace WTF {
class MainThreadInvoker : public QObject { class MainThreadInvoker : public QObject {
Q_OBJECT Q_OBJECT
......
...@@ -29,10 +29,10 @@ ...@@ -29,10 +29,10 @@
#include "config.h" #include "config.h"
#include "MainThread.h" #include "MainThread.h"
#include "Page.h" #include "Assertions.h"
#include <windows.h> #include <windows.h>
namespace WebCore { namespace WTF {
static HWND threadingWindowHandle; static HWND threadingWindowHandle;
static UINT threadingFiredMessage; static UINT threadingFiredMessage;
...@@ -47,23 +47,20 @@ LRESULT CALLBACK ThreadingWindowWndProc(HWND hWnd, UINT message, WPARAM wParam, ...@@ -47,23 +47,20 @@ LRESULT CALLBACK ThreadingWindowWndProc(HWND hWnd, UINT message, WPARAM wParam,
return 0; return 0;
} }
void initializeThreadingAndMainThread() void initializeMainThread()
{ {
if (threadingWindowHandle) if (threadingWindowHandle)
return; return;
KJS::initializeThreading();
WNDCLASSEX wcex; WNDCLASSEX wcex;
memset(&wcex, 0, sizeof(WNDCLASSEX)); memset(&wcex, 0, sizeof(WNDCLASSEX));
wcex.cbSize = sizeof(WNDCLASSEX); wcex.cbSize = sizeof(WNDCLASSEX);
wcex.lpfnWndProc = ThreadingWindowWndProc; wcex.lpfnWndProc = ThreadingWindowWndProc;
wcex.hInstance = Page::instanceHandle();
wcex.lpszClassName = kThreadingWindowClassName; wcex.lpszClassName = kThreadingWindowClassName;
RegisterClassEx(&wcex); RegisterClassEx(&wcex);
threadingWindowHandle = CreateWindow(kThreadingWindowClassName, 0, 0, threadingWindowHandle = CreateWindow(kThreadingWindowClassName, 0, 0,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, Page::instanceHandle(), 0); CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, 0, 0);
threadingFiredMessage = RegisterWindowMessage(L"com.apple.WebKit.MainThreadFired"); threadingFiredMessage = RegisterWindowMessage(L"com.apple.WebKit.MainThreadFired");
} }
......
...@@ -29,13 +29,10 @@ ...@@ -29,13 +29,10 @@
#include "config.h" #include "config.h"
#include "MainThread.h" #include "MainThread.h"
#include "NotImplemented.h" namespace WTF {
namespace WebCore {
void scheduleDispatchFunctionsOnMainThread() void scheduleDispatchFunctionsOnMainThread()
{ {
notImplemented();
} }
} }
2008-04-08 Adam Roben <aroben@apple.com>
Move callOnMainThread to WTF
Reviewed by Alexey Proskuryakov.
* GNUmakefile.am:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCoreSources.bkl:
Removed MainThread files.
* bindings/js/JSCustomSQLTransactionCallback.cpp:
* loader/icon/IconDatabase.cpp:
(WebCore::iconDatabase):
* storage/Database.cpp:
(WebCore::Database::Database):
* storage/DatabaseTracker.cpp:
Updated #includes and replaced calls to
WebCore::initializeThreadingAndMainThread with calls to
KJS::initializeThreading.
* platform/MainThread.cpp: Removed.
* platform/MainThread.h: Removed.
* platform/gtk/MainThreadGtk.cpp: Removed.
* platform/mac/MainThreadMac.mm: Removed.
* platform/qt/MainThreadQt.cpp: Removed.
* platform/win/MainThreadWin.cpp: Removed.
* platform/wx/MainThreadWx.cpp: Removed.
2008-04-07 Timothy Hatcher <timothy@apple.com> 2008-04-07 Timothy Hatcher <timothy@apple.com>
Makes the Network timeline graph resource sizes on the bar graph Makes the Network timeline graph resource sizes on the bar graph
...@@ -866,7 +866,6 @@ webcore_sources += \ ...@@ -866,7 +866,6 @@ webcore_sources += \
WebCore/platform/KURL.cpp \ WebCore/platform/KURL.cpp \
WebCore/platform/Logging.cpp \ WebCore/platform/Logging.cpp \
WebCore/platform/MIMETypeRegistry.cpp \ WebCore/platform/MIMETypeRegistry.cpp \
WebCore/platform/MainThread.cpp \
WebCore/platform/network/AuthenticationChallengeBase.cpp \ WebCore/platform/network/AuthenticationChallengeBase.cpp \
WebCore/platform/network/Credential.cpp \ WebCore/platform/network/Credential.cpp \
WebCore/platform/network/FormData.cpp \ WebCore/platform/network/FormData.cpp \
...@@ -1000,7 +999,6 @@ webkitgtk_sources += \ ...@@ -1000,7 +999,6 @@ webkitgtk_sources += \
WebCore/platform/gtk/Language.cpp \ WebCore/platform/gtk/Language.cpp \
WebCore/platform/gtk/LocalizedStringsGtk.cpp \ WebCore/platform/gtk/LocalizedStringsGtk.cpp \
WebCore/platform/gtk/LoggingGtk.cpp \ WebCore/platform/gtk/LoggingGtk.cpp \
WebCore/platform/gtk/MainThreadGtk.cpp \
WebCore/platform/gtk/MIMETypeRegistryGtk.cpp \ WebCore/platform/gtk/MIMETypeRegistryGtk.cpp \
WebCore/platform/gtk/MouseEventGtk.cpp \ WebCore/platform/gtk/MouseEventGtk.cpp \
WebCore/platform/gtk/PasteboardGtk.cpp \ WebCore/platform/gtk/PasteboardGtk.cpp \
......
...@@ -804,7 +804,6 @@ SOURCES += \ ...@@ -804,7 +804,6 @@ SOURCES += \
platform/KURL.cpp \ platform/KURL.cpp \
platform/Logging.cpp \ platform/Logging.cpp \
platform/MIMETypeRegistry.cpp \ platform/MIMETypeRegistry.cpp \
platform/MainThread.cpp \
platform/network/AuthenticationChallengeBase.cpp \ platform/network/AuthenticationChallengeBase.cpp \
platform/network/Credential.cpp \ platform/network/Credential.cpp \
platform/network/FormData.cpp \ platform/network/FormData.cpp \
......
...@@ -4061,14 +4061,6 @@ ...@@ -4061,14 +4061,6 @@
RelativePath="..\platform\Logging.h" RelativePath="..\platform\Logging.h"
> >
</File> </File>
<File
RelativePath="..\platform\MainThread.cpp"
>
</File>
<File
RelativePath="..\platform\MainThread.h"
>
</File>