ProcessSwap.NavigationWithLockedHistoryWithoutPSON API test is a flaky crash in debug
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2018 02:26:06 +0000 (02:26 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Nov 2018 02:26:06 +0000 (02:26 +0000)
commit35d34cae0e1c43a5a98c5c75c6b4075905e2026b
tree0d08a7d80ec27b03f51e0be0c4d67abd4f937c0a
parentdd6c7faf0c60076a1171c4561079ea6921e432bf
ProcessSwap.NavigationWithLockedHistoryWithoutPSON API test is a flaky crash in debug
https://bugs.webkit.org/show_bug.cgi?id=191795

Reviewed by Alex Christensen.

If the WebProcessPool is getting destroyed while there is a prewarmed WebContent process
that is awaiting its connnection to the network process, then we'll hit the
process->hasOneRef() assertion in the WebProcessPool destructor. This is because
NetworkProcessProxy::m_pendingConnectionReplies keeps a RefPtr to the WebProcessProxy
that is awaiting the connection. The NetworkProcessProxy does not really need to keep
the WebProcessProxy alive in this case so this patch switches to using a WeakPtr instead.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
(WebKit::NetworkProcessProxy::networkProcessCrashed):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/WebProcessProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
Source/WebKit/UIProcess/WebProcessProxy.h