extra/qt5-webengine to 5.13.0-3

This commit is contained in:
Kevin Mihelich 2019-07-19 12:36:40 +00:00
parent 7a3791cc87
commit c138b89987
2 changed files with 35 additions and 1 deletions

View file

@ -11,7 +11,7 @@ highmem=1
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')
@ -24,11 +24,13 @@ _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-76958.patch
0001-ARM-toolchain-fixes.patch
0002-Fix-ARM-skia-ICE.patch)
sha256sums=('e0af82ecee1ab41b6732697f667b98b7b0c53164bebcfaad8070e88b2e064efe'
'dd791f154b48e69cd47fd94753c45448655b529590995fd71ac1591c53a3d60c'
'5771af2442d7743ef7c59f0d3716a23985383e2b69ecb4fa9d4ea8e8f7c551fa'
'eef55340b3ec5f8d1020b7327eda67f86729aaf70107c688deb15083f5ca8fbc'
'f03455dd16275f8abb432278abb908ebdd5f8cf83db73ae63de7a105bbf47109'
'2a363b44b8291512bb2bcbce1370b8abfb8a57961e0e5e34150da6e337155a05')
@ -37,6 +39,7 @@ prepare() {
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

View file

@ -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 &params) {
+ auto navigate = [](QWeakPointer<WebContentsAdapter> weakAdapter, const content::NavigationController::LoadURLParams &params) {
+ 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);
}
}