From f4815cebae99bc27f6880e3281eda81078821d08 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 11 Oct 2016 13:56:31 +0200 Subject: Fix crash in WebEngineContext when using Wayland For some reason the OpenGL context wayland QPA sets has no nativeHandle, so we end up crashing in strcmp. Assume a context without nativeHandle is Wayland or other GLES2 platform and also force GLES2 when using Ozone. Change-Id: Ia3fc524f3ffbb278d86f9153ec96c7258ef86656 Reviewed-by: Michal Klocek --- src/core/web_engine_context.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 7d1e5d609..ceb14f843 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -311,8 +311,15 @@ WebEngineContext::WebEngineContext() const char *glType = 0; if (!usingANGLE() && !usingSoftwareDynamicGL() && !usingQtQuick2DRenderer()) { - if (qt_gl_global_share_context()) { - if (!strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) { + if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) { + // If the native handle is QEGLNativeContext try to use GL ES/2, if there is no native handle + // assume we are using wayland and try GL ES/2, and finally Ozone demands GL ES/2 too. + if (qt_gl_global_share_context()->nativeHandle().isNull() +#ifdef USE_OZONE + || true +#endif + || !strcmp(qt_gl_global_share_context()->nativeHandle().typeName(), "QEGLNativeContext")) + { if (qt_gl_global_share_context()->isOpenGLES()) { glType = gfx::kGLImplementationEGLName; } else { -- cgit v1.2.3 From afedaaf2492ea4899198cb9886f9e249c6cbe119 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 10 Oct 2016 14:05:43 +0200 Subject: Update Chromium Change-Id: I6803569bd7bee4bf8eb94f61771ea2a318eb752b Reviewed-by: Kai Koehne --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/3rdparty b/src/3rdparty index 881a7672e..b82d94c4f 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 881a7672e23192eaf7e1ac2f94e086b560104f10 +Subproject commit b82d94c4f82330ed64ccb639985312198a9cda7a -- cgit v1.2.3 From d82fb129145f933659f0315ca6203ab51c24937a Mon Sep 17 00:00:00 2001 From: Viktor Engelmann Date: Thu, 6 Oct 2016 16:08:30 +0200 Subject: Fix nullpointer dereferencing error Check whether iconUrls is NULL before calling contains(iconUrl) on it, which, under certain circumstances, caused a SEGFAULT. Task-number: QTBUG-56330 Change-Id: Ia167d68a4c4d62af4740a8cbab2686bfbc975455 Reviewed-by: Peter Varga --- src/webengine/api/qquickwebenginefaviconprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/webengine/api/qquickwebenginefaviconprovider.cpp b/src/webengine/api/qquickwebenginefaviconprovider.cpp index fe8436d6c..b5ad6960a 100644 --- a/src/webengine/api/qquickwebenginefaviconprovider.cpp +++ b/src/webengine/api/qquickwebenginefaviconprovider.cpp @@ -152,7 +152,7 @@ QQuickWebEngineView *QQuickWebEngineFaviconProvider::viewForIconUrl(const QUrl & // latest WebEngineView which was raised an iconChanged signal. if (m_latestView) { QList *iconUrls = m_iconUrlMap[m_latestView]; - if (iconUrls->contains(iconUrl)) + if (iconUrls && iconUrls->contains(iconUrl)) return m_latestView; } -- cgit v1.2.3 From 99a2a538eba5e3c351e3118b3c6f71458af91886 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 13 Oct 2016 13:59:08 +0200 Subject: Update Chromium Pulls in security fixes from the Chromium 54.0.2840.59 release, Changes included: - Fix renderer crash on null family strings - [Backport] Blink-in-JS should not run micro tasks - [Backport] Disallow reentrance of FrameView::updateLifecyclePhasesInternal() - [Backport] Check CORS policy on redirect in TextTrackLoader - [Backport] Keep top controls visible if SHOW is called right after HIDE. - [Backport] Merge to 2840 "[DevTools] Avoid current_ and pending_ being the same host in RenderFrameDevToolsAgentHost." - [Backport] Enable do not allow default action for untrusted events. - [Backport] Compare font-feature-settings as part of Font::operator==(). - Stop the flood of accessibility messages - [Backport] Fix for hitting an assert when refreshing a page with an image - [Backport] Report the decoded size to ImageObserver, instead of deltas Change-Id: I142cc070ba7fb215e4a5b9c162852b583dab9784 Reviewed-by: Kai Koehne --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/3rdparty b/src/3rdparty index b82d94c4f..d3651e09c 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit b82d94c4f82330ed64ccb639985312198a9cda7a +Subproject commit d3651e09c34202cc83e32c200fd50cc1f90ab169 -- cgit v1.2.3 From e2541ebdfadea0fe43baac748cfa9e07f3b57215 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 26 Sep 2016 20:26:01 +0200 Subject: Do not call QOpenGLContext::openGLModuleType() from MainDll In case of dynamic OpenGL on Windows this ends on calling QWindowsIntegration::staticOpenGLContext() from MainDll which in case of angle will end up badly. Add warning message when webengine is loaded from plugin and context is not initialized. Task-number: QTBUG-52201 Task-number: QTBUG-55501 Task-number: QTBUG-56020 Change-Id: I03570cad5f686c4a63910c71136bf3eb9499f223 Reviewed-by: Kai Koehne --- src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp index e47f135e8..bf3514f71 100644 --- a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp +++ b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp @@ -48,17 +48,22 @@ namespace QtWebEngineCore } QT_BEGIN_NAMESPACE + +Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); + static void initialize() { - //On window/ANGLE, calling QtWebEngine::initialize from DllMain will result in a crash. - //To ensure it doesn't, we check that when loading the library - //QCoreApplication is not yet instantiated, ensuring the call will be deferred -#if defined(Q_OS_WIN) - if (QCoreApplication::instance() - && QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) { + if (QCoreApplication::instance()) { + //On window/ANGLE, calling QtWebEngine::initialize from DllMain will result in a crash. + if (!qt_gl_global_share_context()) { + qWarning("Qt WebEngine seems to be initialized from a plugin. Please " + "set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute " + "before constructing QGuiApplication."); + } return; } -#endif + + //QCoreApplication is not yet instantiated, ensuring the call will be deferred qAddPreRoutine(QtWebEngineCore::initialize); } -- cgit v1.2.3 From 15ded5ca62f53a01f85a52326f0b335a8a012bbd Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 8 Nov 2016 10:55:05 +0100 Subject: Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pulls in the security fix from Chrome 54.0.2840.87 Change-Id: I70064927cba01b7978742951ba0636b780d9eb68 Reviewed-by: Michael BrĂ¼ning Reviewed-by: Joerg Bornemann --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/3rdparty b/src/3rdparty index d3651e09c..b3c79e92f 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit d3651e09c34202cc83e32c200fd50cc1f90ab169 +Subproject commit b3c79e92f0a631273b639af171e59f4c367ae02e -- cgit v1.2.3