REGRESSION: Crash beneath ResourceLoadObserver::logSubresourceLoading
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 00:57:37 +0000 (00:57 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2019 00:57:37 +0000 (00:57 +0000)
commit97c304631ef3161d1185425470772b61a150e0f6
treed73569cc96d8c61fc7f8256bc698b52df6ee6a34
parent3993ed71f863c606bfd0a5c2e77d2870d3a1b69b
REGRESSION: Crash beneath ResourceLoadObserver::logSubresourceLoading
https://bugs.webkit.org/show_bug.cgi?id=195072

Reviewed by Ryosuke Niwa.

ResourceLoadObserver and WebProcess should exist as long as the web page (process) is running. However,
the NetworkProcess connection can close for a variety of reasons. If the ResourceLoadObserver observes
a load or user gesture in the WebProcess, we should attempt to reconnect to the NetworkProcess (if it
was disconnected), just like we do for other message send cases.

This patch switches from using the m_networkProcessConnection member (which might be null) to use the
'ensureNetworkProcessConnection' accessor which ensures we have a valid connection for message sends.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebProcess.cpp