<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] PlatformDisplayWayland destructor is super crashy"
href="https://bugs.webkit.org/show_bug.cgi?id=157973#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] PlatformDisplayWayland destructor is super crashy"
href="https://bugs.webkit.org/show_bug.cgi?id=157973">bug 157973</a>
from <span class="vcard"><a class="email" href="mailto:mcatanzaro@igalia.com" title="Michael Catanzaro <mcatanzaro@igalia.com>"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=280228&action=diff" name="attach_280228" title="Patch">attachment 280228</a> <a href="attachment.cgi?id=280228&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=280228&action=review">https://bugs.webkit.org/attachment.cgi?id=280228&action=review</a>
I confirm it fixes at least the crash running test-ephy-bookmarks. Awesome, thanks.
<span class="quote">> Source/WebCore/platform/graphics/PlatformDisplay.cpp:171
> + std::atexit([] { PlatformDisplay::sharedDisplay().terminateEGLDisplay(); });</span >
This is harmless, but not really great, since it means terminateEGLDisplay will be redundantly called on the sharedDisplay once for each time initializeEGLDisplay is called on ANY PlatformDisplay object. Perhaps it would it make sense to check if this == PlatformDisplay::sharedDisplay before registering the atexit handler here. Alternatively, and probably better, move this to inside the lambda in PlatformDisplay::sharedDisplay, where it will be called at most once. Or, perhaps the best option is to call terminateEGLDisplay on the current PlatformDisplay (i.e. |this| rather than the sharedDisplay) and remove the call to terminateEGLDisplay from the destructor.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>