[webkit-reviews] review granted: [Bug 217655] [GTK][WPE] PlatformDisplay::terminateEglDisplays() is never called : [Attachment 452853] psaavedra patch version 4

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 22 04:40:45 PST 2022


Carlos Garcia Campos <cgarcia at igalia.com> has granted Pablo Saavedra
<psaavedra at igalia.com>'s request for review:
Bug 217655: [GTK][WPE] PlatformDisplay::terminateEglDisplays() is never called
https://bugs.webkit.org/show_bug.cgi?id=217655

Attachment 452853: psaavedra patch version 4

https://bugs.webkit.org/attachment.cgi?id=452853&action=review




--- Comment #37 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 452853
  --> https://bugs.webkit.org/attachment.cgi?id=452853
psaavedra patch version 4

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

> Source/WebKit/WebProcess/WebProcess.cpp:364
> +// For GTK and WPE ports, do not fast-track an _exit() from a worker thread
on IPC disconnection

Do not call exit in background queue for GTK and WPE because we need to ensure
atexit handlers are called in the main thread to cleanup resources like EGL
displays.

> Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:83
> +    for (auto& webPage : m_pageMap.values())

I've now realized that WebPage::close() calls WebProcess::removeWebPage(), so
m_pageMap is modified while being iterated. Use copyToVector to copy the
values() to a Vector instead of using the iterator directly.

for (auto& webPage : copyToVector(m_pageMap.values()))
    webPage->close();


More information about the webkit-reviews mailing list