[qtwebengine] Add missing string include. (#27972)

* [qtwebengine] Add missing string include.

* Remove no longer used patch.
This commit is contained in:
Billy O'Neal 2022-11-23 13:22:59 -08:00 committed by GitHub
parent 5fe0ac056c
commit 8b8196f0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 98 deletions

View File

@ -1,94 +0,0 @@
From 0ce5e91bdfa2cd7cac247911b9e8c4404c114937 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Thu, 21 Apr 2022 08:49:53 +0200
Subject: [PATCH] Workaround MSVC2022 ICE in constexpr functions
It happens around initialization of STL containers in a constexpr
function. In this case, aggregate initialization of std::array with
double braces seems to cause the crash.
For some reason it doesn't seem to happen in 98-based. This workaround
can be reverted after Microsoft fixes the issue:
https://developercommunity.visualstudio.com/t/fatal-error-C1001:-Internal-compiler-err/1669485
Change-Id: I6bc2c71d328691cc74bc53c6d62f3d5df519b81e
Pick-to: 90-based
Fixes: QTBUG-101917
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
diff --git a/chromium/base/hash/md5_constexpr_internal.h b/chromium/base/hash/md5_constexpr_internal.h
index b705bc8..5c9c004 100644
--- a/chromium/base/hash/md5_constexpr_internal.h
+++ b/chromium/base/hash/md5_constexpr_internal.h
@@ -281,15 +281,63 @@
return IntermediateDataToMD5Digest(ProcessMessage(data, n));
}
- static constexpr uint64_t Hash64(const char* data, uint32_t n) {
- IntermediateData intermediate = ProcessMessage(data, n);
- return (static_cast<uint64_t>(SwapEndian(intermediate.a)) << 32) |
- static_cast<uint64_t>(SwapEndian(intermediate.b));
+ static constexpr uint64_t Hash64(const char* message, uint32_t n) {
+ const uint32_t m = GetPaddedMessageLength(n);
+ IntermediateData intermediate0 = kInitialIntermediateData;
+ for (uint32_t offset = 0; offset < m; offset += 64) {
+ RoundData data = {
+ GetPaddedMessageWord(message, n, m, offset),
+ GetPaddedMessageWord(message, n, m, offset + 4),
+ GetPaddedMessageWord(message, n, m, offset + 8),
+ GetPaddedMessageWord(message, n, m, offset + 12),
+ GetPaddedMessageWord(message, n, m, offset + 16),
+ GetPaddedMessageWord(message, n, m, offset + 20),
+ GetPaddedMessageWord(message, n, m, offset + 24),
+ GetPaddedMessageWord(message, n, m, offset + 28),
+ GetPaddedMessageWord(message, n, m, offset + 32),
+ GetPaddedMessageWord(message, n, m, offset + 36),
+ GetPaddedMessageWord(message, n, m, offset + 40),
+ GetPaddedMessageWord(message, n, m, offset + 44),
+ GetPaddedMessageWord(message, n, m, offset + 48),
+ GetPaddedMessageWord(message, n, m, offset + 52),
+ GetPaddedMessageWord(message, n, m, offset + 56),
+ GetPaddedMessageWord(message, n, m, offset + 60)};
+ IntermediateData intermediate1 = intermediate0;
+ for (uint32_t i = 0; i < 64; ++i)
+ intermediate1 = ApplyStep(i, data, intermediate1);
+ intermediate0 = Add(intermediate0, intermediate1);
+ }
+ return (static_cast<uint64_t>(SwapEndian(intermediate0.a)) << 32) |
+ static_cast<uint64_t>(SwapEndian(intermediate0.b));
}
- static constexpr uint32_t Hash32(const char* data, uint32_t n) {
- IntermediateData intermediate = ProcessMessage(data, n);
- return SwapEndian(intermediate.a);
+ static constexpr uint32_t Hash32(const char* message, uint32_t n) {
+ const uint32_t m = GetPaddedMessageLength(n);
+ IntermediateData intermediate0 = kInitialIntermediateData;
+ for (uint32_t offset = 0; offset < m; offset += 64) {
+ RoundData data = {
+ GetPaddedMessageWord(message, n, m, offset),
+ GetPaddedMessageWord(message, n, m, offset + 4),
+ GetPaddedMessageWord(message, n, m, offset + 8),
+ GetPaddedMessageWord(message, n, m, offset + 12),
+ GetPaddedMessageWord(message, n, m, offset + 16),
+ GetPaddedMessageWord(message, n, m, offset + 20),
+ GetPaddedMessageWord(message, n, m, offset + 24),
+ GetPaddedMessageWord(message, n, m, offset + 28),
+ GetPaddedMessageWord(message, n, m, offset + 32),
+ GetPaddedMessageWord(message, n, m, offset + 36),
+ GetPaddedMessageWord(message, n, m, offset + 40),
+ GetPaddedMessageWord(message, n, m, offset + 44),
+ GetPaddedMessageWord(message, n, m, offset + 48),
+ GetPaddedMessageWord(message, n, m, offset + 52),
+ GetPaddedMessageWord(message, n, m, offset + 56),
+ GetPaddedMessageWord(message, n, m, offset + 60)};
+ IntermediateData intermediate1 = intermediate0;
+ for (uint32_t i = 0; i < 64; ++i)
+ intermediate1 = ApplyStep(i, data, intermediate1);
+ intermediate0 = Add(intermediate0, intermediate1);
+ }
+ return SwapEndian(intermediate0.a);
}
};

View File

@ -0,0 +1,12 @@
diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h b/src/3rdparty/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h
index 3a54bbe..3420147 100644
--- a/src/3rdparty/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h
+++ b/src/3rdparty/chromium/third_party/skia/src/core/SkShaderCodeDictionary.h
@@ -11,6 +11,7 @@
#include <array>
#include <unordered_map>
#include <vector>
+#include <string>
#include "include/core/SkSpan.h"
#include "include/private/SkSpinlock.h"
#include "include/private/SkUniquePaintParamsID.h"

View File

@ -1,7 +1,9 @@
set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase")
include("${SCRIPT_PATH}/qt_install_submodule.cmake")
#set(${PORT}_PATCHES 0ce5e91.diff) # ICE Workaround; Needs path adjustments
set(${PORT}_PATCHES
add-missing-string.patch
)
set(TOOL_NAMES gn QtWebEngineProcess qwebengine_convert_dict)
@ -78,7 +80,7 @@ if(WIN32) # WIN32 HOST probably has win_flex and win_bison!
endif()
string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtree_length)
# We know that C:/buildrees/${PORT} is to long to build Release. Debug works however. Means 24 length is too much but 23 might work.
# We know that C:/buildrees/${PORT} is to long to build Release. Debug works however. Means 24 length is too much but 23 might work.
if(buildtree_length GREATER 22 AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "arm64")
message(WARNING "Buildtree path '${CURRENT_BUILDTREES_DIR}' is too long.\nConsider passing --x-buildtrees-root=<shortpath> to vcpkg!\nTrying to use '${CURRENT_BUILDTREES_DIR}/../tmp'")
set(CURRENT_BUILDTREES_DIR "${CURRENT_BUILDTREES_DIR}/../tmp") # activly avoid long path issues in CI. -> Means CI will not return logs
@ -99,7 +101,7 @@ if(QT_UPDATE_VERSION)
return()
endif()
qt_cmake_configure( DISABLE_PARALLEL_CONFIGURE # due to in source changes.
qt_cmake_configure( DISABLE_PARALLEL_CONFIGURE # due to in source changes.
OPTIONS ${FEATURE_OPTIONS}
-DGPerf_EXECUTABLE=${GPERF}
-DBISON_EXECUTABLE=${BISON}

View File

@ -2,6 +2,7 @@
"$comment": "x86-windows is not within the upstream support matrix of Qt6",
"name": "qtwebengine",
"version": "6.4.1",
"port-version": 1,
"description": "Qt WebEngine",
"homepage": "https://www.qt.io/",
"license": null,

View File

@ -6394,7 +6394,7 @@
},
"qtwebengine": {
"baseline": "6.4.1",
"port-version": 0
"port-version": 1
},
"qtwebsockets": {
"baseline": "6.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "56c8290990699a0947a4583d9365feeeb3acad10",
"version": "6.4.1",
"port-version": 1
},
{
"git-tree": "d42fac47feb315e847b30c86520ddaf3a309e76e",
"version": "6.4.1",