QtWebKit: GCC 8 fixes

This commit is contained in:
Gerasim Troeglazov
2019-06-11 20:59:13 +10:00
parent ab768b2bf3
commit 59018c8ec2
2 changed files with 129 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
From 6fa51ba42c90a763e62c68f214fae419a9475994 Mon Sep 17 00:00:00 2001
From aa0477a53c2658353631918cccce173acc94d76a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 30 Jul 2018 20:43:21 +1000
Subject: Fix build for Haiku
@@ -457,10 +457,10 @@ index 51a3ffb..bbf3cb0 100644
#endif
RefPtr<ProcessLauncher> protector(this);
--
2.19.1
2.21.0
From f1a5eddd7c4681e79f6b061519960db76b7ef43c Mon Sep 17 00:00:00 2001
From cdeb7ad9ca1cf2110967846fcbd282e560180efe Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 31 Jul 2018 21:15:51 +1000
Subject: Fix build with gcc7
@@ -480,10 +480,10 @@ index 0fcd4df..6672ce3 100644
#include <wtf/HashSet.h>
#include <wtf/Vector.h>
--
2.19.1
2.21.0
From cb95581e9dfc13d93e3eca20503e179ac077d5d2 Mon Sep 17 00:00:00 2001
From 2c6358879377eff084584ddc960820410b7549a7 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 6 Aug 2018 19:05:44 +1000
Subject: Enable SubtleCrypto via gnutls
@@ -1535,10 +1535,10 @@ index 003fdca..8b55902 100644
set(USE_MEDIA_FOUNDATION OFF)
set(USE_QT_MULTIMEDIA OFF)
--
2.19.1
2.21.0
From 0a5bc6121fba8b2c58ca319eacfc326c55aa5b79 Mon Sep 17 00:00:00 2001
From 2abee76e9644cce6ff73418b2cfd2687a793fbba Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 13 Jan 2019 13:37:51 +1000
Subject: Rework MachineStackMarker
@@ -1613,5 +1613,125 @@ index a16f0da..9c48fb1 100644
struct PlatformRegisters {
pthread_attr_t attribute;
--
2.19.1
2.21.0
From 7fbd27d2a42898304adeae5000346d598de47d2c Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 11 Jun 2019 20:53:16 +1000
Subject: Fix some GCC 8 warnings (partial backport of r231565)
diff --git a/Source/WTF/wtf/HashTable.h b/Source/WTF/wtf/HashTable.h
index 712022d..f95167f 100644
--- a/Source/WTF/wtf/HashTable.h
+++ b/Source/WTF/wtf/HashTable.h
@@ -845,7 +845,7 @@ namespace WTF {
// This initializes the bucket without copying the empty value.
// That makes it possible to use this with types that don't support copying.
// The memset to 0 looks like a slow operation but is optimized by the compilers.
- memset(&bucket, 0, sizeof(bucket));
+ memset(static_cast<void*>(std::addressof(bucket)), 0, sizeof(bucket));
}
};
diff --git a/Source/WTF/wtf/Vector.h b/Source/WTF/wtf/Vector.h
index 18268b6..d9a25ac 100644
--- a/Source/WTF/wtf/Vector.h
+++ b/Source/WTF/wtf/Vector.h
@@ -85,7 +85,7 @@ struct VectorInitializer<true, true, T>
{
static void initialize(T* begin, T* end)
{
- memset(begin, 0, reinterpret_cast<char*>(end) - reinterpret_cast<char*>(begin));
+ memset(static_cast<void*>(begin), 0, reinterpret_cast<char*>(end) - reinterpret_cast<char*>(begin));
}
};
@@ -125,11 +125,11 @@ struct VectorMover<true, T>
{
static void move(const T* src, const T* srcEnd, T* dst)
{
- memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+ memcpy(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
}
static void moveOverlapping(const T* src, const T* srcEnd, T* dst)
{
- memmove(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+ memmove(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
}
};
@@ -155,7 +155,7 @@ struct VectorCopier<true, T>
{
static void uninitializedCopy(const T* src, const T* srcEnd, T* dst)
{
- memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
+ memcpy(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
}
template<typename U>
static void uninitializedCopy(const T* src, const T* srcEnd, U* dst)
diff --git a/Source/WebCore/platform/Length.h b/Source/WebCore/platform/Length.h
index 75ccf77..b5697ce 100644
--- a/Source/WebCore/platform/Length.h
+++ b/Source/WebCore/platform/Length.h
@@ -170,12 +170,12 @@ inline Length::Length(const Length& other)
if (other.isCalculated())
other.ref();
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(const_cast<Length*>(&other)), sizeof(Length));
}
inline Length::Length(Length&& other)
{
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(&other), sizeof(Length));
other.m_type = Auto;
}
@@ -189,7 +189,7 @@ inline Length& Length::operator=(const Length& other)
if (isCalculated())
deref();
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(const_cast<Length*>(&other)), sizeof(Length));
return *this;
}
@@ -201,7 +201,7 @@ inline Length& Length::operator=(Length&& other)
if (isCalculated())
deref();
- memcpy(this, &other, sizeof(Length));
+ memcpy(static_cast<void*>(this), static_cast<void*>(&other), sizeof(Length));
other.m_type = Auto;
return *this;
}
--
2.21.0
From 58f7b9cc73d69e845d4a6ab0e41317e0c409bbd8 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 11 Jun 2019 20:54:14 +1000
Subject: Add attribute fastcall to derived class member
JSImageConstructor::construct
diff --git a/Source/WebCore/bindings/js/JSImageConstructor.cpp b/Source/WebCore/bindings/js/JSImageConstructor.cpp
index 9236906..de553f5 100644
--- a/Source/WebCore/bindings/js/JSImageConstructor.cpp
+++ b/Source/WebCore/bindings/js/JSImageConstructor.cpp
@@ -44,7 +44,7 @@ template<> JSValue JSImageConstructor::prototypeForStructure(VM& vm, const JSDOM
return JSHTMLElement::getConstructor(vm, &globalObject);
}
-template<> EncodedJSValue JSImageConstructor::construct(ExecState* state)
+template<> EncodedJSValue JSC_HOST_CALL JSImageConstructor::construct(ExecState* state)
{
JSImageConstructor* jsConstructor = jsCast<JSImageConstructor*>(state->callee());
Document* document = jsConstructor->document();
--
2.21.0

View File

@@ -9,7 +9,7 @@ HOMEPAGE="https://www.qt.io"
COPYRIGHT="2015-2018 The Qt Company Ltd."
LICENSE="BSD (3-clause)
GNU LGPL v2.1"
REVISION="8"
REVISION="9"
srcGitRev="72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da"
SOURCE_URI="https://github.com/qt/qtwebkit/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="2e393e7429387437cbfef56ec839329663e9b136ea68997d1e1cdd2f4d9d3ae0"