修复64k页大小的时候,运行错误

Signed-off-by: wei dong <weidong@uniontech.com>
This commit is contained in:
wei dong 2021-12-22 17:28:00 +08:00
parent 9fe75c4bb8
commit d2c0d6376a
2 changed files with 96 additions and 1 deletions

View File

@ -6,7 +6,7 @@
Name: qt5-qtwebengine
Version: 5.11.1
Release: 8
Release: 9
Summary: Qt5 - QtWebEngine components
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
URL: http://www.qt.io
@ -42,6 +42,9 @@ Patch0006: qtwebengine-everywhere-src-5.10.0-gn-bootstrap-verbose.patch
# to get the value we expect (and chromium checks for). Patch by spot.
# From: https://gitlab.com/unity-mageia/qtwebengine5/-/blob/master/qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch
Patch0009: qtwebengine-everywhere-src-5.10.1-gcc8-alignof.patch
## bug48291 add for deepin manual
Patch0010: qtwebengine-everywhere-src-5.11.1-enable-64k-pagesize.patch
BuildRequires: qt5-qtbase-devel qt5-qtbase-private-devel qt5-qtdeclarative-devel qt5-qtxmlpatterns-devel
BuildRequires: qt5-qtlocation-devel qt5-qtsensors-devel qt5-qtwebchannel-devel qt5-qttools-static
BuildRequires: qt5-qtquickcontrols2-devel ninja-build cmake bison flex git-core gperf libicu-devel
@ -219,6 +222,9 @@ done
%{_qt5_examplesdir}/
%changelog
* Wed Dec 22 2021 weidong <weidong@uniontech.com> - 5.11.1-9
- Fix bug48291,enable 64k pagesize
* Tue May 19 2020 fengtao <fengtao40@huawei.com> - 5.11.1-8
- rebuild for libwebp-1.1.0

View File

@ -0,0 +1,89 @@
diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h
index a39b4e3013e82fcfcde99d6e4e0a4bb798260984..a25d7a4e16ba9fec94617e1e82631604ebe1d852 100644
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator.h
@@ -15,13 +15,13 @@
namespace base {
-#if defined(OS_WIN)
+//#if defined(OS_WIN)
static const size_t kPageAllocationGranularityShift = 16; // 64KB
-#elif defined(_MIPS_ARCH_LOONGSON)
-static const size_t kPageAllocationGranularityShift = 14; // 16KB
-#else
-static const size_t kPageAllocationGranularityShift = 12; // 4KB
-#endif
+//#elif defined(_MIPS_ARCH_LOONGSON)
+//static const size_t kPageAllocationGranularityShift = 14; // 16KB
+//#else
+//static const size_t kPageAllocationGranularityShift = 12; // 4KB
+//#endif
static const size_t kPageAllocationGranularity =
1 << kPageAllocationGranularityShift;
static const size_t kPageAllocationGranularityOffsetMask =
@@ -29,11 +29,11 @@ static const size_t kPageAllocationGranularityOffsetMask =
static const size_t kPageAllocationGranularityBaseMask =
~kPageAllocationGranularityOffsetMask;
-#if defined(_MIPS_ARCH_LOONGSON)
-static const size_t kSystemPageSize = 16384;
-#else
-static const size_t kSystemPageSize = 4096;
-#endif
+//#if defined(_MIPS_ARCH_LOONGSON)
+//static const size_t kSystemPageSize = 16384;
+//#else
+static const size_t kSystemPageSize = 65536;
+//#endif
static const size_t kSystemPageOffsetMask = kSystemPageSize - 1;
static_assert((kSystemPageSize & (kSystemPageSize - 1)) == 0,
"kSystemPageSize must be power of 2");
diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h
index 6e5143b094ae2e99fdcfe6b9d60d93a662200d29..4f7c1498ee2618464a4cd9dfa473ea28ea9a3944 100644
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.h
@@ -97,11 +97,14 @@ static const size_t kBucketShift = (kAllocationGranularity == 8) ? 3 : 2;
// system page of the span. For our current max slot span size of 64k and other
// constant values, we pack _all_ PartitionRootGeneric::Alloc() sizes perfectly
// up against the end of a system page.
-#if defined(_MIPS_ARCH_LOONGSON)
-static const size_t kPartitionPageShift = 16; // 64KB
-#else
-static const size_t kPartitionPageShift = 14; // 16KB
-#endif
+//#if defined(_MIPS_ARCH_LOONGSON)
+//static const size_t kPartitionPageShift = 16; // 64KB
+//#else
+//static const size_t kPartitionPageShift = 14; // 16KB
+//#endif
+
+static const size_t kPartitionPageShift = 18; // 256KB
+
static const size_t kPartitionPageSize = 1 << kPartitionPageShift;
static const size_t kPartitionPageOffsetMask = kPartitionPageSize - 1;
static const size_t kPartitionPageBaseMask = ~kPartitionPageOffsetMask;
diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h b/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h
index 20674563ebabb60dccbb8adb4ebc2a4b2cee4117..7b47a30d5502f6c1222226017cddfac6082daeec 100644
--- a/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h
+++ b/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/HeapPage.h
@@ -62,15 +62,15 @@ constexpr size_t kBlinkPageBaseMask = ~kBlinkPageOffsetMask;
constexpr size_t kBlinkPagesPerRegion = 10;
// TODO(nya): Replace this with something like #if ENABLE_NACL.
-#if 0
+//#if 0
// NaCl's system page size is 64 KiB. This causes a problem in Oilpan's heap
// layout because Oilpan allocates two guard pages for each Blink page (whose
// size is kBlinkPageSize = 2^17 = 128 KiB). So we don't use guard pages in
// NaCl.
constexpr size_t kBlinkGuardPageSize = 0;
-#else
-constexpr size_t kBlinkGuardPageSize = base::kSystemPageSize;
-#endif
+//#else
+//constexpr size_t kBlinkGuardPageSize = base::kSystemPageSize;
+//#endif
// Double precision floats are more efficient when 8-byte aligned, so we 8-byte
// align all allocations (even on 32 bit systems).