[arch-commits] Commit in qt5-webengine/trunk (PKGBUILD qtbug-76958.patch)
Antonio Rojas
arojas at archlinux.org
Fri Jul 19 08:38:33 UTC 2019
Date: Friday, July 19, 2019 @ 08:38:33
Author: arojas
Revision: 358140
Fix crash when loading background tabs in Falkon
Added:
qt5-webengine/trunk/qtbug-76958.patch
Modified:
qt5-webengine/trunk/PKGBUILD
-------------------+
PKGBUILD | 9 ++++++---
qtbug-76958.patch | 31 +++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-07-19 06:43:59 UTC (rev 358139)
+++ PKGBUILD 2019-07-19 08:38:33 UTC (rev 358140)
@@ -4,7 +4,7 @@
pkgname=qt5-webengine
_qtver=5.13.0
pkgver=${_qtver/-/}
-pkgrel=2
+pkgrel=3
arch=('x86_64')
url='https://www.qt.io'
license=('LGPL3' 'LGPL2.1' 'BSD')
@@ -16,10 +16,12 @@
_pkgfqn="${pkgname/5-/}-everywhere-src-${_qtver}"
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
qtwebengine-glibc-2.29.patch
- qtbug-76913.patch::"https://code.qt.io/cgit/qt/qtwebengine.git/patch/?id=4746bb90")
+ qtbug-76913.patch::"https://code.qt.io/cgit/qt/qtwebengine.git/patch/?id=4746bb90"
+ qtbug-76958.patch) # "https://code.qt.io/cgit/qt/qtwebengine.git/patch/?id=662de14c"
sha256sums=('e0af82ecee1ab41b6732697f667b98b7b0c53164bebcfaad8070e88b2e064efe'
'dd791f154b48e69cd47fd94753c45448655b529590995fd71ac1591c53a3d60c'
- '5771af2442d7743ef7c59f0d3716a23985383e2b69ecb4fa9d4ea8e8f7c551fa')
+ '5771af2442d7743ef7c59f0d3716a23985383e2b69ecb4fa9d4ea8e8f7c551fa'
+ 'eef55340b3ec5f8d1020b7327eda67f86729aaf70107c688deb15083f5ca8fbc')
prepare() {
mkdir -p build
@@ -26,6 +28,7 @@
cd ${_pkgfqn}
patch -p1 -i ../qtbug-76913.patch # Fix crashes on media-heavy sites
+ patch -p1 -i ../qtbug-76958.patch # Fix crash when loading tabs on the background
cd src/3rdparty/chromium
patch -p1 -i "$srcdir"/qtwebengine-glibc-2.29.patch # Fix PPAPI plugins with glibc 2.29
Added: qtbug-76958.patch
===================================================================
--- qtbug-76958.patch (rev 0)
+++ qtbug-76958.patch 2019-07-19 08:38:33 UTC (rev 358140)
@@ -0,0 +1,31 @@
+diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
+index c4f4591e..dc005b62 100644
+--- a/src/core/web_contents_adapter.cpp
++++ b/src/core/web_contents_adapter.cpp
+@@ -671,19 +671,23 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request)
+ }
+ }
+
+- auto navigate = [](WebContentsAdapter *adapter, const content::NavigationController::LoadURLParams ¶ms) {
++ auto navigate = [](QWeakPointer<WebContentsAdapter> weakAdapter, const content::NavigationController::LoadURLParams ¶ms) {
++ WebContentsAdapter *adapter = weakAdapter.data();
++ if (!adapter)
++ return;
+ adapter->webContents()->GetController().LoadURLWithParams(params);
+ // Follow chrome::Navigate and invalidate the URL immediately.
+ adapter->m_webContentsDelegate->NavigationStateChanged(adapter->webContents(), content::INVALIDATE_TYPE_URL);
+ adapter->focusIfNecessary();
+ };
+
++ QWeakPointer<WebContentsAdapter> weakThis(sharedFromThis());
+ if (resizeNeeded) {
+ // Schedule navigation on the event loop.
+ base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI},
+- base::BindOnce(navigate, this, std::move(params)));
++ base::BindOnce(navigate, std::move(weakThis), std::move(params)));
+ } else {
+- navigate(this, params);
++ navigate(std::move(weakThis), params);
+ }
+ }
+
More information about the arch-commits
mailing list