summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2020-02-29 03:36:32 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2020-03-02 15:49:34 +0300
commit4351bcf3a4044ec08937434e814470322545641c (patch)
treee4c202746e4bb30b37def2f80bfcc338792ca1f7
parentbe8798cf5aef981028cccab88b3b03576986389e (diff)
downloadqtwebkit-4351bcf3a4044ec08937434e814470322545641c.tar.gz
Import QtWebKit commit 3e299f5a501465c9d986c4daaf6fb82f52d4cd20
Change-Id: I824dea42f8cb17c1b587e55fc80a05fc917e39f2 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
-rw-r--r--Source/JavaScriptCore/API/tests/testapi.c9
-rw-r--r--Source/JavaScriptCore/jsc.cpp9
-rw-r--r--Source/JavaScriptCore/testRegExp.cpp9
-rw-r--r--Source/WTF/wtf/CurrentTime.cpp29
-rw-r--r--Source/WTF/wtf/win/WTFDLL.cpp50
-rw-r--r--Source/cmake/OptionsQt.cmake2
-rwxr-xr-xTools/qt/make-snapshot.pl1
7 files changed, 32 insertions, 77 deletions
diff --git a/Source/JavaScriptCore/API/tests/testapi.c b/Source/JavaScriptCore/API/tests/testapi.c
index cbf9daf18..7f7ee7d5c 100644
--- a/Source/JavaScriptCore/API/tests/testapi.c
+++ b/Source/JavaScriptCore/API/tests/testapi.c
@@ -1117,15 +1117,6 @@ static void checkConstnessInJSObjectNames()
int main(int argc, char* argv[])
{
#if OS(WINDOWS)
-#if defined(_M_X64) || defined(__x86_64__)
- // The VS2013 runtime has a bug where it mis-detects AVX-capable processors
- // if the feature has been disabled in firmware. This causes us to crash
- // in some of the math functions. For now, we disable those optimizations
- // because Microsoft is not going to fix the problem in VS2013.
- // FIXME: http://webkit.org/b/141449: Remove this workaround when we switch to VS2015+.
- _set_FMA3_enable(0);
-#endif
-
// Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
// testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
// error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>.
diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp
index c0a84fc5f..2bdb953e2 100644
--- a/Source/JavaScriptCore/jsc.cpp
+++ b/Source/JavaScriptCore/jsc.cpp
@@ -1714,14 +1714,7 @@ int main(int argc, char** argv)
fesetenv( &env );
#endif
-#if OS(WINDOWS) && (defined(_M_X64) || defined(__x86_64__))
- // The VS2013 runtime has a bug where it mis-detects AVX-capable processors
- // if the feature has been disabled in firmware. This causes us to crash
- // in some of the math functions. For now, we disable those optimizations
- // because Microsoft is not going to fix the problem in VS2013.
- // FIXME: http://webkit.org/b/141449: Remove this workaround when we switch to VS2015+.
- _set_FMA3_enable(0);
-
+#if OS(WINDOWS)
// Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
// testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
// error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>.
diff --git a/Source/JavaScriptCore/testRegExp.cpp b/Source/JavaScriptCore/testRegExp.cpp
index abb17365b..819d28f75 100644
--- a/Source/JavaScriptCore/testRegExp.cpp
+++ b/Source/JavaScriptCore/testRegExp.cpp
@@ -164,15 +164,6 @@ int realMain(int argc, char** argv);
int main(int argc, char** argv)
{
#if OS(WINDOWS)
-#if defined(_M_X64) || defined(__x86_64__)
- // The VS2013 runtime has a bug where it mis-detects AVX-capable processors
- // if the feature has been disabled in firmware. This causes us to crash
- // in some of the math functions. For now, we disable those optimizations
- // because Microsoft is not going to fix the problem in VS2013.
- // FIXME: http://webkit.org/b/141449: Remove this workaround when we switch to VS2015+.
- _set_FMA3_enable(0);
-#endif
-
// Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
// testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
// error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>.
diff --git a/Source/WTF/wtf/CurrentTime.cpp b/Source/WTF/wtf/CurrentTime.cpp
index 8774314fe..90dce34a7 100644
--- a/Source/WTF/wtf/CurrentTime.cpp
+++ b/Source/WTF/wtf/CurrentTime.cpp
@@ -91,6 +91,35 @@ static double lowResUTCTime()
#if USE(QUERY_PERFORMANCE_COUNTER)
+#if defined(_WIN32) && (defined(__x86_64__) || defined(_AMD64_)) && _WIN32_WINNT < 0x0600
+/* GetTickCount64() is not available on XP. */
+ULONGLONG GetTickCount64 ()
+{
+ static ULONGLONG (CALLBACK *DynGetTickCount64)() = (ULONGLONG (*)(void))-1;
+ static DWORD last_ticks = 0;
+ static DWORD n_overflow = 0;
+ DWORD ticks = 0;
+ HINSTANCE hKernel32;
+
+ if (DynGetTickCount64 == (void*)-1)
+ {
+ hKernel32 = GetModuleHandleW(L"KERNEL32");
+ DynGetTickCount64 = *(ULONGLONG (*)(void))(GetProcAddress(hKernel32,
+ "GetTickCount64"));
+ }
+ if (DynGetTickCount64 != (void*) NULL)
+ {
+ return DynGetTickCount64();
+ }
+
+ ticks = GetTickCount();
+ if (ticks < last_ticks)
+ n_overflow++;
+ last_ticks = ticks;
+ return ((ULONGLONG)n_overflow << 32LL) + (ULONGLONG)GetTickCount();
+}
+#endif
+
static LARGE_INTEGER qpcFrequency;
static bool syncedTime;
diff --git a/Source/WTF/wtf/win/WTFDLL.cpp b/Source/WTF/wtf/win/WTFDLL.cpp
deleted file mode 100644
index 779e1b862..000000000
--- a/Source/WTF/wtf/win/WTFDLL.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-* Copyright (C) 2015 Apple Inc. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-* 1. Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* 2. Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-*
-* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
-* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include <Windows.h>
-#include <math.h>
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
- switch (fdwReason) {
- case DLL_PROCESS_ATTACH:
-#if defined(_M_X64) || defined(__x86_64__)
- // The VS2013 runtime has a bug where it mis-detects AVX-capable processors
- // if the feature has been disabled in firmware. This causes us to crash
- // in some of the math functions. For now, we disable those optimizations
- // because Microsoft is not going to fix the problem in VS2013.
- // FIXME: http://webkit.org/b/141449: Remove this workaround when we switch to VS2015+.
- _set_FMA3_enable(0);
-#endif
- break;
-
- case DLL_PROCESS_DETACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- break;
- }
-
- return TRUE;
-}
diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
index 83ff1ceb6..28b38fbf5 100644
--- a/Source/cmake/OptionsQt.cmake
+++ b/Source/cmake/OptionsQt.cmake
@@ -139,7 +139,7 @@ macro(QTWEBKIT_GENERATE_MOC_FILES_H _target)
endmacro()
macro(QTWEBKIT_SEPARATE_DEBUG_INFO _target _target_debug)
- if (UNIX AND NOT APPLE)
+ if (MINGW OR UNIX AND NOT APPLE) # Not using COMPILER_IS_GCC_OR_CLANG because other ELF compilers may work as well
if (NOT CMAKE_OBJCOPY)
message(WARNING "CMAKE_OBJCOPY is not defined - debug information will not be split")
else ()
diff --git a/Tools/qt/make-snapshot.pl b/Tools/qt/make-snapshot.pl
index 8b189059c..027c425f3 100755
--- a/Tools/qt/make-snapshot.pl
+++ b/Tools/qt/make-snapshot.pl
@@ -50,6 +50,7 @@ my @commands = (
"Tools/gtk/make-dist.py -t snapshot Tools/qt/manifest.txt",
"cd $target_repo",
"git rm -rf *",
+ "git checkout HEAD dist", # hack to avoid removing dist
"tar -xf $src_repo/snapshot.tar --strip-components=1",
"git add -A",
"rm $src_repo/snapshot.tar",