[WPE] Crash in wpe_view_backend_get_renderer_host_fd
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jun 2017 11:14:44 +0000 (11:14 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jun 2017 11:14:44 +0000 (11:14 +0000)
commit5310f2e5097373035215b50a009c05bdd6bf0499
tree17a59a9ae970ad38fdaebfa04159724a644b104f
parentf92dd015509812feb1ab6d60271fbfc65fa9e1b0
[WPE] Crash in wpe_view_backend_get_renderer_host_fd
https://bugs.webkit.org/show_bug.cgi?id=173760

Reviewed by Žan Doberšek.

This can happen if views are created and destroyed quickly. The problem is that CompositingManagerProxy adds a
message receiver but never removes it, so it's possible that the message arrives right after the view has been
destroyed. This is happening most of the times running /wpe/WebKitAutomationSession/request-session that creates
3 web views in a row that are deleted when the test finishes.

Fixes /wpe/WebKitAutomationSession/request-session.

* UIProcess/API/wpe/CompositingManagerProxy.cpp:
(WebKit::CompositingManagerProxy::finalize): Remove the message handler.
* UIProcess/API/wpe/CompositingManagerProxy.h:
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::View::~View): Call CompositingManagerProxy::finalize().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/wpe/CompositingManagerProxy.cpp
Source/WebKit2/UIProcess/API/wpe/CompositingManagerProxy.h
Source/WebKit2/UIProcess/API/wpe/WPEView.cpp