[Webkit-unassigned] [Bug 157973] [Wayland] PlatformDisplayWayland destructor is super crashy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 1 05:27:35 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157973

--- Comment #6 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 280228
  --> https://bugs.webkit.org/attachment.cgi?id=280228
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=280228&action=review

I confirm it fixes at least the crash running test-ephy-bookmarks. Awesome, thanks.

> Source/WebCore/platform/graphics/PlatformDisplay.cpp:171
> +    std::atexit([] { PlatformDisplay::sharedDisplay().terminateEGLDisplay(); });

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160601/52931759/attachment-0001.html>


More information about the webkit-unassigned mailing list