Title: [283801] trunk/Source/WebCore
- Revision
- 283801
- Author
- csaave...@igalia.com
- Date
- 2021-10-08 08:08:27 -0700 (Fri, 08 Oct 2021)
Log Message
[LibWPE] Do not destroy EGL backend if not created
https://bugs.webkit.org/show_bug.cgi?id=224309
Reviewed by Carlos Garcia Campos.
about:gpu will create a PlatformDisplay to fill in GPU
information, but this doesn't call
LibWPEPlatformDisplay::initialize() as it doesn't need to, so the
backend member is not initialized. Make sure that the backend is
not a nullptr before attempting to destroy it when the display is
destroyed.
* platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:
(WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE):
* platform/graphics/libwpe/PlatformDisplayLibWPE.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (283800 => 283801)
--- trunk/Source/WebCore/ChangeLog 2021-10-08 14:44:40 UTC (rev 283800)
+++ trunk/Source/WebCore/ChangeLog 2021-10-08 15:08:27 UTC (rev 283801)
@@ -1,3 +1,21 @@
+2021-10-08 Claudio Saavedra <csaave...@igalia.com>
+
+ [LibWPE] Do not destroy EGL backend if not created
+ https://bugs.webkit.org/show_bug.cgi?id=224309
+
+ Reviewed by Carlos Garcia Campos.
+
+ about:gpu will create a PlatformDisplay to fill in GPU
+ information, but this doesn't call
+ LibWPEPlatformDisplay::initialize() as it doesn't need to, so the
+ backend member is not initialized. Make sure that the backend is
+ not a nullptr before attempting to destroy it when the display is
+ destroyed.
+
+ * platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:
+ (WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE):
+ * platform/graphics/libwpe/PlatformDisplayLibWPE.h:
+
2021-10-08 Tyler Wilcock <tyle...@apple.com>
AX: Expose the URL attribute of <video> elements
Modified: trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.cpp (283800 => 283801)
--- trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.cpp 2021-10-08 14:44:40 UTC (rev 283800)
+++ trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.cpp 2021-10-08 15:08:27 UTC (rev 283801)
@@ -68,7 +68,8 @@
PlatformDisplayLibWPE::~PlatformDisplayLibWPE()
{
- wpe_renderer_backend_egl_destroy(m_backend);
+ if (m_backend)
+ wpe_renderer_backend_egl_destroy(m_backend);
}
bool PlatformDisplayLibWPE::initialize(int hostFd)
Modified: trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.h (283800 => 283801)
--- trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.h 2021-10-08 14:44:40 UTC (rev 283800)
+++ trunk/Source/WebCore/platform/graphics/libwpe/PlatformDisplayLibWPE.h 2021-10-08 15:08:27 UTC (rev 283801)
@@ -48,7 +48,7 @@
Type type() const override { return PlatformDisplay::Type::WPE; }
- struct wpe_renderer_backend_egl* m_backend;
+ struct wpe_renderer_backend_egl* m_backend { nullptr };
};
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes