summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/wtf
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-07-22 15:37:06 +0100
committerBen Murdoch <benm@google.com>2010-07-27 10:20:25 +0100
commit967717af5423377c967781471ee106e2bb4e11c8 (patch)
tree1e701dc0a12f7f07cce1df4a7681717de77a211b /JavaScriptCore/wtf
parentdcc30a9fca45f634b1d3a12b276d3a0ccce99fc3 (diff)
downloadexternal_webkit-967717af5423377c967781471ee106e2bb4e11c8.zip
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.gz
external_webkit-967717af5423377c967781471ee106e2bb4e11c8.tar.bz2
Merge WebKit at r63859 : Initial merge by git.
Change-Id: Ie8096c63ec7c991c9a9cba8bdd9c3b74a3b8ed62
Diffstat (limited to 'JavaScriptCore/wtf')
-rw-r--r--JavaScriptCore/wtf/MathExtras.h8
-rw-r--r--JavaScriptCore/wtf/PassRefPtr.h6
-rw-r--r--JavaScriptCore/wtf/Platform.h13
-rw-r--r--JavaScriptCore/wtf/RetainPtr.h2
-rw-r--r--JavaScriptCore/wtf/text/StringImpl.h31
5 files changed, 19 insertions, 41 deletions
diff --git a/JavaScriptCore/wtf/MathExtras.h b/JavaScriptCore/wtf/MathExtras.h
index 0222a10..8a8741c 100644
--- a/JavaScriptCore/wtf/MathExtras.h
+++ b/JavaScriptCore/wtf/MathExtras.h
@@ -54,6 +54,14 @@ const double piDouble = M_PI;
const float piFloat = static_cast<float>(M_PI);
#endif
+#ifndef M_PI_2
+const double piOverTwoDouble = 1.57079632679489661923;
+const float piOverTwoFloat = 1.57079632679489661923f;
+#else
+const double piOverTwoDouble = M_PI_2;
+const float piOverTwoFloat = static_cast<float>(M_PI_2);
+#endif
+
#ifndef M_PI_4
const double piOverFourDouble = 0.785398163397448309616;
const float piOverFourFloat = 0.785398163397448309616f;
diff --git a/JavaScriptCore/wtf/PassRefPtr.h b/JavaScriptCore/wtf/PassRefPtr.h
index 230637a..54fa14c 100644
--- a/JavaScriptCore/wtf/PassRefPtr.h
+++ b/JavaScriptCore/wtf/PassRefPtr.h
@@ -96,7 +96,7 @@ namespace WTF {
friend PassRefPtr adoptRef<T>(T*);
// FIXME: Remove releaseRef once we change all callers to call leakRef instead.
- T* releaseRef() const { return leakRef(); } WARN_UNUSED_RETURN;
+ T* releaseRef() const WARN_UNUSED_RETURN { return leakRef(); }
private:
// adopting constructor
@@ -152,13 +152,13 @@ namespace WTF {
T* get() const { return m_ptr; }
void clear();
- T* leakRef() const { T* tmp = m_ptr; m_ptr = 0; return tmp; } WARN_UNUSED_RETURN;
+ T* leakRef() const WARN_UNUSED_RETURN { T* tmp = m_ptr; m_ptr = 0; return tmp; }
T& operator*() const { return *m_ptr; }
T* operator->() const { return m_ptr; }
// FIXME: Remove releaseRef once we change all callers to call leakRef instead.
- T* releaseRef() const { return leakRef(); } WARN_UNUSED_RETURN;
+ T* releaseRef() const WARN_UNUSED_RETURN { return leakRef(); }
private:
mutable T* m_ptr;
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index 2500c56..4166ad9 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -944,7 +944,6 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
/* The JIT is tested & working on x86 Mac */
#elif CPU(X86) && PLATFORM(MAC)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(ARM_THUMB2) && PLATFORM(IPHONE)
#define ENABLE_JIT 1
/* The JIT is tested & working on Android */
@@ -960,16 +959,12 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define ENABLE_JIT 1
#elif CPU(X86) && OS(DARWIN)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
#elif CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
#elif CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100
#define ENABLE_JIT 1
#elif CPU(ARM_TRADITIONAL) && OS(LINUX)
@@ -978,7 +973,6 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define ENABLE_JIT 1
#elif CPU(MIPS) && OS(LINUX)
#define ENABLE_JIT 1
- #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 0
#endif
#endif /* PLATFORM(QT) */
@@ -1138,4 +1132,11 @@ on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
#define WTF_USE_PLATFORM_STRATEGIES 1
#endif
+/* Geolocation request policy. pre-emptive policy is to acquire user permission before acquiring location.
+ Client based implementations will have option to choose between pre-emptive and nonpre-emptive permission policy.
+ pre-emptive permission policy is enabled by default for all client-based implementations. */
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#define WTF_USE_PREEMPT_GEOLOCATION_PERMISSION 1
+#endif
+
#endif /* WTF_Platform_h */
diff --git a/JavaScriptCore/wtf/RetainPtr.h b/JavaScriptCore/wtf/RetainPtr.h
index 2768be7..f5a027e 100644
--- a/JavaScriptCore/wtf/RetainPtr.h
+++ b/JavaScriptCore/wtf/RetainPtr.h
@@ -71,7 +71,7 @@ namespace WTF {
PtrType get() const { return m_ptr; }
- PtrType releaseRef() { PtrType tmp = m_ptr; m_ptr = 0; return tmp; } WARN_UNUSED_RETURN;
+ PtrType releaseRef() { PtrType tmp = m_ptr; m_ptr = 0; return tmp; }
PtrType operator->() const { return m_ptr; }
diff --git a/JavaScriptCore/wtf/text/StringImpl.h b/JavaScriptCore/wtf/text/StringImpl.h
index a172e2c..244009f 100644
--- a/JavaScriptCore/wtf/text/StringImpl.h
+++ b/JavaScriptCore/wtf/text/StringImpl.h
@@ -257,37 +257,6 @@ public:
memcpy(destination, source, numCharacters * sizeof(UChar));
}
- PassRefPtr<StringImpl> copyStringWithoutBOMs(bool definitelyHasBOMs, bool& hasBOMs)
- {
- static const UChar byteOrderMark = 0xFEFF;
- size_t i = 0;
- if (!definitelyHasBOMs) {
- hasBOMs = false;
- // ECMA-262 calls for stripping all Cf characters, but we only strip BOM characters.
- // See <https://bugs.webkit.org/show_bug.cgi?id=4931> for details.
- for (; i < m_length; i++) {
- if (UNLIKELY(m_data[i] == byteOrderMark)) {
- hasBOMs = true;
- break;
- }
- }
- if (!hasBOMs)
- return this;
- }
- Vector<UChar> result;
- result.reserveInitialCapacity(m_length);
- size_t firstBOM = i;
- i = 0;
- for (; i < firstBOM; i++)
- result.append(m_data[i]);
- for (; i < m_length; i++) {
- UChar c = m_data[i];
- if (c != byteOrderMark)
- result.append(c);
- }
- return StringImpl::adopt(result);
- }
-
// Returns a StringImpl suitable for use on another thread.
PassRefPtr<StringImpl> crossThreadString();
// Makes a deep copy. Helpful only if you need to use a String on another thread