Title: [261905] trunk/Source
- Revision
- 261905
- Author
- hironori.fu...@sony.com
- Date
- 2020-05-19 21:18:03 -0700 (Tue, 19 May 2020)
Log Message
[WinCairo] ASSERT(m_eglDisplay == EGL_NO_DISPLAY) fails in ~PlatformDisplay()
https://bugs.webkit.org/show_bug.cgi?id=212065
Reviewed by Don Olmstead.
Source/WebCore:
PlatformDisplay destoys m_eglDisplay by using std::atexit to
ensure they are destructed before EGL's atexit handler (Bug 157973).
However, calling eglTerminate in atexit handler causes a
crash on Windows (Bug 145832, Bug 170331).
Then, r214688 added shutDownEglDisplays() and explicitly call it
in shutDownWebKit() to destory m_eglDisplay in Windows WebKit1.
However, Windows WebKit2 may call _exit() in IPC::Connection's
WorkQueue thread. It doesn't seem a good idea that explicitly
destructing m_eglDisplay by calling shutDownEglDisplays().
Remove shutDownEglDisplays() and the assertion for Windows.
* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::~PlatformDisplay): Conditioned out the
assertion for PLATFORM(WIN).
(WebCore::PlatformDisplay::initializeEGLDisplay): Restored the
original atexit handler of r201595.
(WebCore::PlatformDisplay::shutDownEglDisplays): Deleted.
* platform/graphics/PlatformDisplay.h:
Source/WebKitLegacy/win:
* WebKitDLL.cpp:
(shutDownWebKit): Don't call PlatformDisplay::shutDownEglDisplays().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (261904 => 261905)
--- trunk/Source/WebCore/ChangeLog 2020-05-20 03:31:18 UTC (rev 261904)
+++ trunk/Source/WebCore/ChangeLog 2020-05-20 04:18:03 UTC (rev 261905)
@@ -1,3 +1,31 @@
+2020-05-19 Fujii Hironori <hironori.fu...@sony.com>
+
+ [WinCairo] ASSERT(m_eglDisplay == EGL_NO_DISPLAY) fails in ~PlatformDisplay()
+ https://bugs.webkit.org/show_bug.cgi?id=212065
+
+ Reviewed by Don Olmstead.
+
+ PlatformDisplay destoys m_eglDisplay by using std::atexit to
+ ensure they are destructed before EGL's atexit handler (Bug 157973).
+ However, calling eglTerminate in atexit handler causes a
+ crash on Windows (Bug 145832, Bug 170331).
+
+ Then, r214688 added shutDownEglDisplays() and explicitly call it
+ in shutDownWebKit() to destory m_eglDisplay in Windows WebKit1.
+ However, Windows WebKit2 may call _exit() in IPC::Connection's
+ WorkQueue thread. It doesn't seem a good idea that explicitly
+ destructing m_eglDisplay by calling shutDownEglDisplays().
+
+ Remove shutDownEglDisplays() and the assertion for Windows.
+
+ * platform/graphics/PlatformDisplay.cpp:
+ (WebCore::PlatformDisplay::~PlatformDisplay): Conditioned out the
+ assertion for PLATFORM(WIN).
+ (WebCore::PlatformDisplay::initializeEGLDisplay): Restored the
+ original atexit handler of r201595.
+ (WebCore::PlatformDisplay::shutDownEglDisplays): Deleted.
+ * platform/graphics/PlatformDisplay.h:
+
2020-05-19 Darin Adler <da...@apple.com>
REGRESSION (r259930): Dictation marker at start of text is removed when added trailing whitespace is collapsed
Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp (261904 => 261905)
--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2020-05-20 03:31:18 UTC (rev 261904)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2020-05-20 04:18:03 UTC (rev 261905)
@@ -158,7 +158,7 @@
PlatformDisplay::~PlatformDisplay()
{
-#if USE(EGL)
+#if USE(EGL) && !PLATFORM(WIN)
ASSERT(m_eglDisplay == EGL_NO_DISPLAY);
#endif
if (s_sharedDisplayForCompositing == this)
@@ -232,7 +232,12 @@
// EGL atexit handlers and the PlatformDisplay destructor.
// See https://bugs.webkit.org/show_bug.cgi?id=157973.
eglAtexitHandlerInitialized = true;
- std::atexit(shutDownEglDisplays);
+ std::atexit([] {
+ while (!eglDisplays().isEmpty()) {
+ auto* display = eglDisplays().takeAny();
+ display->terminateEGLDisplay();
+ }
+ });
}
#endif
}
@@ -251,14 +256,6 @@
m_eglDisplay = EGL_NO_DISPLAY;
}
-void PlatformDisplay::shutDownEglDisplays()
-{
- while (!eglDisplays().isEmpty()) {
- auto* display = eglDisplays().takeAny();
- display->terminateEGLDisplay();
- }
-}
-
#endif // USE(EGL)
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.h (261904 => 261905)
--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.h 2020-05-20 03:31:18 UTC (rev 261904)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.h 2020-05-20 04:18:03 UTC (rev 261905)
@@ -75,7 +75,6 @@
#if USE(EGL)
EGLDisplay eglDisplay() const;
bool eglCheckVersion(int major, int minor) const;
- static void shutDownEglDisplays();
#endif
#if ENABLE(VIDEO) && USE(GSTREAMER_GL)
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (261904 => 261905)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2020-05-20 03:31:18 UTC (rev 261904)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2020-05-20 04:18:03 UTC (rev 261905)
@@ -1,3 +1,13 @@
+2020-05-19 Fujii Hironori <hironori.fu...@sony.com>
+
+ [WinCairo] ASSERT(m_eglDisplay == EGL_NO_DISPLAY) fails in ~PlatformDisplay()
+ https://bugs.webkit.org/show_bug.cgi?id=212065
+
+ Reviewed by Don Olmstead.
+
+ * WebKitDLL.cpp:
+ (shutDownWebKit): Don't call PlatformDisplay::shutDownEglDisplays().
+
2020-05-12 Chris Dumez <cdu...@apple.com>
[WK2] Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API
Modified: trunk/Source/WebKitLegacy/win/WebKitDLL.cpp (261904 => 261905)
--- trunk/Source/WebKitLegacy/win/WebKitDLL.cpp 2020-05-20 03:31:18 UTC (rev 261904)
+++ trunk/Source/WebKitLegacy/win/WebKitDLL.cpp 2020-05-20 04:18:03 UTC (rev 261905)
@@ -163,9 +163,6 @@
void shutDownWebKit()
{
WebKit::WebStorageNamespaceProvider::closeLocalStorage();
-#if USE(EGL)
- PlatformDisplay::shutDownEglDisplays();
-#endif
}
//FIXME: We should consider moving this to a new file for cross-project functionality
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes