diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-07-18 13:59:28 +0200 |
commit | 4d6084feccab99c0a7b3ecef26bb49c41dd50201 (patch) | |
tree | fd1195897f551eee6d5a15d07ff5733b15aa2a5c /Source/WTF | |
parent | ae901828d4689ab9e89113f6b6ea8042b37a9fda (diff) | |
download | qtwebkit-4d6084feccab99c0a7b3ecef26bb49c41dd50201.tar.gz |
Imported WebKit commit ff52235a78888e5cb8e286a828a8698042200e67 (http://svn.webkit.org/repository/webkit/trunk@122948)
New snapshot that should fix the rendering issues recently introduced
Diffstat (limited to 'Source/WTF')
-rw-r--r-- | Source/WTF/ChangeLog | 60 | ||||
-rw-r--r-- | Source/WTF/WTF.pri | 7 | ||||
-rw-r--r-- | Source/WTF/wtf/ExportMacros.h | 60 | ||||
-rw-r--r-- | Source/WTF/wtf/FastMalloc.cpp | 4 | ||||
-rw-r--r-- | Source/WTF/wtf/Platform.h | 4 | ||||
-rw-r--r-- | Source/WTF/wtf/ThreadSpecific.h | 36 | ||||
-rw-r--r-- | Source/WTF/wtf/ThreadSpecificWin.cpp | 90 | ||||
-rw-r--r-- | Source/WTF/wtf/blackberry/MainThreadBlackBerry.cpp | 5 |
8 files changed, 119 insertions, 147 deletions
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog index f73f5142b..c94173fed 100644 --- a/Source/WTF/ChangeLog +++ b/Source/WTF/ChangeLog @@ -1,3 +1,63 @@ +2012-07-17 Gabor Ballabas <gaborb@inf.u-szeged.hu> + + [Qt][V8] Remove the V8 related codepaths and configuration + https://bugs.webkit.org/show_bug.cgi?id=90863 + + Reviewed by Simon Hausmann. + + * WTF.pri: + +2012-07-17 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r122834. + http://trac.webkit.org/changeset/122834 + https://bugs.webkit.org/show_bug.cgi?id=91492 + + it broke the chromium (Requested by kkristof on #webkit). + + * WTF.pri: + +2012-07-17 Gabor Ballabas <gaborb@inf.u-szeged.hu> + + [Qt][V8] Remove the V8 related codepaths and configuration + https://bugs.webkit.org/show_bug.cgi?id=90863 + + Reviewed by Simon Hausmann. + + * WTF.pri: + +2012-07-16 Hajime Morrita <morrita@chromium.org> + + WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing. + https://bugs.webkit.org/show_bug.cgi?id=90764 + + Reviewed by Adam Barth. + + Added USE(EXPORT_MACROS_FOR_TESTING) and enabled it on GTK and Windows. + + * wtf/ExportMacros.h: + * wtf/Platform.h: + +2012-07-16 Filip Pizlo <fpizlo@apple.com> + + Unreviewed build fix. + + * wtf/FastMalloc.cpp: + (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): + +2012-07-16 Adam Treat <atreat@rim.com> + + [BlackBerry] Use newer version of platform API to implement callOnMainThread + https://bugs.webkit.org/show_bug.cgi?id=91404 + + Reviewed by Yong Li. + + Right now we're using an outdated API that involves a virtual function call for no reason. + Use the new API that is much more direct and to the point. + + * wtf/blackberry/MainThreadBlackBerry.cpp: + (WTF::scheduleDispatchFunctionsOnMainThread): + 2012-07-14 Filip Pizlo <fpizlo@apple.com> Unreviewed, build fix. diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri index 306a18012..024c7f69f 100644 --- a/Source/WTF/WTF.pri +++ b/Source/WTF/WTF.pri @@ -24,13 +24,6 @@ haveQt(5) { } } -v8 { - !haveQt(5): error("To build QtWebKit+V8 you need to use Qt 5") - DEFINES *= WTF_USE_V8=1 - INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WebKit/qt/v8/ForwardingHeaders - QT += v8-private -} - linux-*:contains(DEFINES, WTF_USE_GSTREAMER=1) { DEFINES += ENABLE_GLIB_SUPPORT=1 PKGCONFIG += glib-2.0 gio-2.0 diff --git a/Source/WTF/wtf/ExportMacros.h b/Source/WTF/wtf/ExportMacros.h index 20732b2a6..e784247c4 100644 --- a/Source/WTF/wtf/ExportMacros.h +++ b/Source/WTF/wtf/ExportMacros.h @@ -48,26 +48,40 @@ #define WTF_INTERNAL #endif -// See note in wtf/Platform.h for more info on EXPORT_MACROS. -#if USE(EXPORT_MACROS) - #if !PLATFORM(CHROMIUM) && OS(WINDOWS) -#define WTF_EXPORT __declspec(dllexport) -#define WTF_IMPORT __declspec(dllimport) -#define WTF_HIDDEN + +#define WTF_EXPORT_DECLARATION __declspec(dllexport) +#define WTF_IMPORT_DECLARATION __declspec(dllimport) +#define WTF_HIDDEN_DECLARATION + #elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) -#define WTF_EXPORT __attribute__((visibility("default"))) -#define WTF_IMPORT WTF_EXPORT -#define WTF_HIDDEN __attribute__((visibility("hidden"))) + +#define WTF_EXPORT_DECLARATION __attribute__((visibility("default"))) +#define WTF_IMPORT_DECLARATION WTF_EXPORT_DECLARATION +#define WTF_HIDDEN_DECLARATION __attribute__((visibility("hidden"))) + #else -#define WTF_EXPORT -#define WTF_IMPORT -#define WTF_HIDDEN + +#define WTF_EXPORT_DECLARATION +#define WTF_IMPORT_DECLARATION +#define WTF_HIDDEN_DECLARATION + #endif +#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF) || (PLATFORM(WX) && defined(BUILDING_JavaScriptCore)) +#define WTF_IS_LINKED_IN_SAME_BINARY 1 +#endif + +// See note in wtf/Platform.h for more info on EXPORT_MACROS. +#if USE(EXPORT_MACROS) + +#define WTF_EXPORT WTF_EXPORT_DECLARATION +#define WTF_IMPORT WTF_IMPORT_DECLARATION +#define WTF_HIDDEN WTF_IMPORT_DECLARATION + // FIXME: When all ports are using the export macros, we should replace // WTF_EXPORTDATA with WTF_EXPORT_PRIVATE macros. -#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF) || (PLATFORM(WX) && defined(BUILDING_JavaScriptCore)) +#if defined(WTF_IS_LINKED_IN_SAME_BINARY) #define WTF_EXPORTDATA WTF_EXPORT #else #define WTF_EXPORTDATA WTF_IMPORT @@ -93,7 +107,25 @@ #endif // USE(EXPORT_MACROS) -#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF) || (PLATFORM(WX) && defined(BUILDING_JavaScriptCore)) +// WTF_TESTING (and WEBCORE_TESTING in PlatformExportMacros.h) is used for +// exporting symbols which are referred from WebCoreTestSupport library. +// Since the set of APIs is common between ports, +// it is rather worth annotating inside the code than maintaining port specific export lists. +#if USE(EXPORT_MACROS_FOR_TESTING) + +#if defined(WTF_IS_LINKED_IN_SAME_BINARY) +#define WTF_TESTING WTF_EXPORT_DECLARATION +#else +#define WTF_TESTING WTF_IMPORT_DECLARATION +#endif + +#else // USE(EXPORT_MACROS_FOR_TESTING) + +#define WTF_TESTING + +#endif // USE(EXPORT_MACROS_FOR_TESTING) + +#if defined(WTF_IS_LINKED_IN_SAME_BINARY) #define WTF_EXPORT_PRIVATE WTF_EXPORT #else #define WTF_EXPORT_PRIVATE WTF_IMPORT diff --git a/Source/WTF/wtf/FastMalloc.cpp b/Source/WTF/wtf/FastMalloc.cpp index 0083f18d6..dddfcc699 100644 --- a/Source/WTF/wtf/FastMalloc.cpp +++ b/Source/WTF/wtf/FastMalloc.cpp @@ -4654,10 +4654,10 @@ extern "C" { malloc_introspection_t jscore_fastmalloc_introspection = { &FastMallocZone::enumerate, &FastMallocZone::goodSize, &FastMallocZone::check, &FastMallocZone::print, &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlock, &FastMallocZone::statistics -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 || OS(IOS) +#if OS(IOS) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 , 0 // zone_locked will not be called on the zone unless it advertises itself as version five or higher. #endif -#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 || OS(IOS) +#if OS(IOS) || __MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 , 0, 0, 0, 0 // These members will not be used unless the zone advertises itself as version seven or higher. #endif diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index fbf881a5e..c17f3e1bc 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -1082,6 +1082,10 @@ #define WTF_USE_EXPORT_MACROS 1 #endif +#if !defined(WTF_USE_EXPORT_MACROS_FOR_TESTING) && (PLATFORM(GTK) || PLATFORM(WIN)) +#define WTF_USE_EXPORT_MACROS_FOR_TESTING 1 +#endif + #if (PLATFORM(QT) && !OS(DARWIN)) || PLATFORM(GTK) || PLATFORM(EFL) #define WTF_USE_UNIX_DOMAIN_SOCKETS 1 #endif diff --git a/Source/WTF/wtf/ThreadSpecific.h b/Source/WTF/wtf/ThreadSpecific.h index 60c9907bd..f51ab4cf2 100644 --- a/Source/WTF/wtf/ThreadSpecific.h +++ b/Source/WTF/wtf/ThreadSpecific.h @@ -1,7 +1,6 @@ /* * Copyright (C) 2008 Apple Inc. All rights reserved. * Copyright (C) 2009 Jian Li <jianli@chromium.org> - * Copyright (C) 2012 Patrick Gansterer <paroga@paroga.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -103,33 +102,6 @@ private: }; #if USE(PTHREADS) - -typedef pthread_key_t ThreadSpecificKey; - -inline void ThreadSpecificKeyCreate(ThreadSpecificKey* key, void (*destructor)(void *)) -{ - int error = pthread_key_create(key, destructor); - if (error) - CRASH(); -} - -inline void ThreadSpecificKeyDelete(ThreadSpecificKey key) -{ - int error = pthread_key_delete(key); - if (error) - CRASH(); -} - -inline void ThreadSpecificSet(ThreadSpecificKey key, void* value) -{ - pthread_setspecific(key, value); -} - -inline void* ThreadSpecificGet(ThreadSpecificKey key) -{ - return pthread_getspecific(key); -} - template<typename T> inline ThreadSpecific<T>::ThreadSpecific() { @@ -167,14 +139,6 @@ const int kMaxTlsKeySize = 256; WTF_EXPORT_PRIVATE long& tlsKeyCount(); WTF_EXPORT_PRIVATE DWORD* tlsKeys(); -class ThreadSpecificKeyValue; -typedef ThreadSpecificKeyValue* ThreadSpecificKey; - -void ThreadSpecificKeyCreate(ThreadSpecificKey*, void (*)(void *)); -void ThreadSpecificKeyDelete(ThreadSpecificKey); -void ThreadSpecificSet(ThreadSpecificKey, void*); -void* ThreadSpecificGet(ThreadSpecificKey); - template<typename T> inline ThreadSpecific<T>::ThreadSpecific() : m_index(-1) diff --git a/Source/WTF/wtf/ThreadSpecificWin.cpp b/Source/WTF/wtf/ThreadSpecificWin.cpp index 61a594251..d72996a7a 100644 --- a/Source/WTF/wtf/ThreadSpecificWin.cpp +++ b/Source/WTF/wtf/ThreadSpecificWin.cpp @@ -1,6 +1,5 @@ /* * Copyright (C) 2009 Jian Li <jianli@chromium.org> - * Copyright (C) 2012 Patrick Gansterer <paroga@paroga.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -20,72 +19,15 @@ */ #include "config.h" -#include "ThreadSpecific.h" -#include "StdLibExtras.h" -#include "ThreadingPrimitives.h" +#include "ThreadSpecific.h" -#if !USE(PTHREADS) +#if USE(PTHREADS) +#error This file should not be compiled by ports that do not use Windows native ThreadSpecific implementation. +#endif namespace WTF { -static Mutex& destructorsMutex() -{ - DEFINE_STATIC_LOCAL(Mutex, staticMutex, ()); - return staticMutex; -} - -class ThreadSpecificKeyValue { -public: - ThreadSpecificKeyValue(void (*destructor)(void *)) - : m_destructor(destructor) - { - m_tlsKey = TlsAlloc(); - if (m_tlsKey == TLS_OUT_OF_INDEXES) - CRASH(); - - MutexLocker locker(destructorsMutex()); - m_next = m_first; - m_first = this; - } - - ~ThreadSpecificKeyValue() - { - MutexLocker locker(destructorsMutex()); - ThreadSpecificKeyValue** next = &m_first; - while (*next != this) { - ASSERT(*next); - next = &(*next)->m_next; - } - *next = (*next)->m_next; - - TlsFree(m_tlsKey); - } - - void setValue(void* data) { TlsSetValue(m_tlsKey, data); } - void* value() { return TlsGetValue(m_tlsKey); } - - static void callDestructors() - { - MutexLocker locker(destructorsMutex()); - ThreadSpecificKeyValue* next = m_first; - while (next) { - if (void* data = next->value()) - next->m_destructor(data); - next = next->m_next; - } - } - -private: - void (*m_destructor)(void *); - DWORD m_tlsKey; - ThreadSpecificKeyValue* m_next; - - static ThreadSpecificKeyValue* m_first; -}; - -ThreadSpecificKeyValue* ThreadSpecificKeyValue::m_first = 0; - long& tlsKeyCount() { static long count; @@ -98,26 +40,6 @@ DWORD* tlsKeys() return keys; } -void ThreadSpecificKeyCreate(ThreadSpecificKey* key, void (*destructor)(void *)) -{ - *key = new ThreadSpecificKeyValue(destructor); -} - -void ThreadSpecificKeyDelete(ThreadSpecificKey key) -{ - delete key; -} - -void ThreadSpecificSet(ThreadSpecificKey key, void* data) -{ - key->setValue(data); -} - -void* ThreadSpecificGet(ThreadSpecificKey key) -{ - return key->value(); -} - void ThreadSpecificThreadExit() { for (long i = 0; i < tlsKeyCount(); i++) { @@ -126,10 +48,6 @@ void ThreadSpecificThreadExit() if (data) data->destructor(data); } - - ThreadSpecificKeyValue::callDestructors(); } } // namespace WTF - -#endif // !USE(PTHREADS) diff --git a/Source/WTF/wtf/blackberry/MainThreadBlackBerry.cpp b/Source/WTF/wtf/blackberry/MainThreadBlackBerry.cpp index 7284f4b44..ec7a364dd 100644 --- a/Source/WTF/wtf/blackberry/MainThreadBlackBerry.cpp +++ b/Source/WTF/wtf/blackberry/MainThreadBlackBerry.cpp @@ -19,7 +19,8 @@ #include "config.h" #include "MainThread.h" -#include <BlackBerryPlatformClient.h> +#include <BlackBerryPlatformExecutableMessage.h> +#include <BlackBerryPlatformMessageClient.h> namespace WTF { @@ -29,7 +30,7 @@ void initializeMainThreadPlatform() void scheduleDispatchFunctionsOnMainThread() { - BlackBerry::Platform::Client::get()->scheduleCallOnMainThread(dispatchFunctionsFromMainThread); + BlackBerry::Platform::webKitThreadMessageClient()->dispatchMessage(BlackBerry::Platform::createFunctionCallMessage(dispatchFunctionsFromMainThread)); } } // namespace WTF |