summaryrefslogtreecommitdiff
path: root/Source/WTF
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-27 09:28:46 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-27 09:28:46 +0200
commit6668b07fcd51f86be243b9e08e667224e30c0cf8 (patch)
tree64f466e09b68a77ae1156c0d35cd5b95e18a34ca /Source/WTF
parente7923d9de38974f0c6fb7646c898a6ea618261e8 (diff)
downloadqtwebkit-6668b07fcd51f86be243b9e08e667224e30c0cf8.tar.gz
Imported WebKit commit 26cd9bd8ab0471ffe987c9b60368f63dc0f1f31b (http://svn.webkit.org/repository/webkit/trunk@121325)
New snapshot with more Windows build fixes
Diffstat (limited to 'Source/WTF')
-rw-r--r--Source/WTF/ChangeLog37
-rw-r--r--Source/WTF/wtf/ExportMacros.h6
-rw-r--r--Source/WTF/wtf/Platform.h3
-rw-r--r--Source/WTF/wtf/ThreadSpecific.h36
-rw-r--r--Source/WTF/wtf/ThreadSpecificWin.cpp90
-rw-r--r--Source/WTF/wtf/text/StringBuilder.h15
6 files changed, 37 insertions, 150 deletions
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index a7f149bed..49282e263 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,17 +1,36 @@
-2012-06-19 Joel Dillon <joel.dillon@codethink.co.uk> Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+2012-06-25 Kent Tamura <tkent@chromium.org>
- [Qt][Win] Fix broken QtWebKit5.lib linking
- https://bugs.webkit.org/show_bug.cgi?id=88321
+ Unreviewed, rolling out r121145.
+ http://trac.webkit.org/changeset/121145
+ https://bugs.webkit.org/show_bug.cgi?id=89847
- Reviewed by NOBODY (OOPS!).
+ Had an objection for the change.
- Instead of letting a module's headers know which other modules depend on them,
- have depending modules define explicitely that they want its symbols exported too.
+ * wtf/text/StringBuilder.h:
- JavaScriptCore should then be compiled with both BUILDING_JavaScriptCore and
- STATICALLY_LINKED_WITH_WTF.
+2012-06-25 Yong Li <yoli@rim.com>
- * wtf/ExportMacros.h:
+ [BlackBerry] Add JSC statistics into about:memory
+ https://bugs.webkit.org/show_bug.cgi?id=89779
+
+ Reviewed by Rob Buis.
+
+ Turn on WTF_USE_EXPORT_MACROS for BlackBerry port.
+ This will make macros like JS_EXPORT_PRIVATE work without
+ extra porting.
+
+ * wtf/Platform.h:
+
+2012-06-25 Adam Barth <abarth@webkit.org>
+
+ Use InterpolationLow on chromium-android
+ https://bugs.webkit.org/show_bug.cgi?id=89849
+
+ Reviewed by Daniel Bates.
+
+ Introduce a USE macro to control image interpolation quality.
+
+ * wtf/Platform.h:
2012-06-25 Kent Tamura <tkent@chromium.org>
diff --git a/Source/WTF/wtf/ExportMacros.h b/Source/WTF/wtf/ExportMacros.h
index d50d6d117..efa0c8f81 100644
--- a/Source/WTF/wtf/ExportMacros.h
+++ b/Source/WTF/wtf/ExportMacros.h
@@ -72,7 +72,7 @@
// 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)
+#if defined(BUILDING_WTF) || defined(BUILDING_JavaScriptCore)
#define WTF_EXPORTDATA WTF_EXPORT
#else
#define WTF_EXPORTDATA WTF_IMPORT
@@ -81,7 +81,7 @@
#else // !USE(EXPORT_MACROS)
#if !PLATFORM(CHROMIUM) && OS(WINDOWS) && !COMPILER(GCC)
-#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF)
+#if defined(BUILDING_WTF) || defined(BUILDING_JavaScriptCore)
#define WTF_EXPORTDATA __declspec(dllexport)
#else
#define WTF_EXPORTDATA __declspec(dllimport)
@@ -98,7 +98,7 @@
#endif // USE(EXPORT_MACROS)
-#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF)
+#if defined(BUILDING_WTF) || defined(BUILDING_JavaScriptCore)
#define WTF_EXPORT_PRIVATE WTF_EXPORT
#else
#define WTF_EXPORT_PRIVATE WTF_IMPORT
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 4a68e49d2..72e66f094 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -474,6 +474,7 @@
#define WTF_USE_QCMSLIB 1
#elif OS(ANDROID)
#define WTF_USE_SKIA 1
+#define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1
#else
#define WTF_USE_SKIA 1
#define WTF_USE_ICCJPEG 1
@@ -1065,7 +1066,7 @@
since most ports try to support sub-project independence, adding new headers
to WTF causes many ports to break, and so this way we can address the build
breakages one port at a time. */
-#if !defined(WTF_USE_EXPORT_MACROS) && (PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(WX))
+#if !defined(WTF_USE_EXPORT_MACROS) && (PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(WX) || PLATFORM(BLACKBERRY))
#define WTF_USE_EXPORT_MACROS 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/text/StringBuilder.h b/Source/WTF/wtf/text/StringBuilder.h
index c73d46372..d896d17b1 100644
--- a/Source/WTF/wtf/text/StringBuilder.h
+++ b/Source/WTF/wtf/text/StringBuilder.h
@@ -130,21 +130,6 @@ public:
append(static_cast<LChar>(c));
}
- void appendEscaped(const String& string, UChar escape, UChar special)
- {
- if (string.isEmpty())
- return;
- unsigned requiredSize = length() + string.length();
- if (capacity() < requiredSize)
- reserveCapacity(requiredSize);
- for (unsigned i = 0; i < string.length(); ++i) {
- UChar ch = string[i];
- if (ch == escape || ch == special)
- append(escape);
- append(ch);
- }
- }
-
String toString()
{
shrinkToFit();