<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[260283] trunk/Source/WebKit</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/260283">260283</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2020-04-17 14:20:25 -0700 (Fri, 17 Apr 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS] Refactor WebKit uploads process assertion logic to minimize chances of leaking them
https://bugs.webkit.org/show_bug.cgi?id=210664
<rdar://problem/61751982>

Reviewed by Geoff Garen.

To minimize chances of leaking "WebKit uploads" process assertion, the following refactoring
was done:
1. WebKit upload assertions are now held by NetworkProcessProxy instead of the WebProcessPool.
   This makes more sense since uploads are tied to a particular network process. In base of
   a network process crash, we would not want those assertions to persist for example.
2. Store all upload assertions (UIProcess + NetworkProcess + WebProcesses) into a single
   UploadActivity data structure that can easily be cleared. Make sure we clear it on network
   process crash.
3. No longer on the WebProcess to send IPC whenever its has pending uploads or not. Instead,
   have the network process send such IPC. This makes more sense, especially now that all
   webkit upload process assertions are now stored on NetworkProcessProxy. It also makes it
   so that we deal properly with WebProcess crashes. In case of a WebProcess crash, its
   connection to the network process will get closed. NetworkConnectionToWebProcess::didClose()
   gets called and causes all NetworkResourceLoader objects for this connection to get
   destroyed. As a result, the network process will properly notify the UIProcess that this
   process no longer has any upload in progress.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::hasUploadStateChanged):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoadMap.cpp:
(WebKit::NetworkResourceLoadMap::NetworkResourceLoadMap):
(WebKit::NetworkResourceLoadMap::~NetworkResourceLoadMap):
(WebKit::NetworkResourceLoadMap::add):
(WebKit::NetworkResourceLoadMap::clear):
(WebKit::NetworkResourceLoadMap::take):
(WebKit::NetworkResourceLoadMap::setHasUpload):
* NetworkProcess/NetworkResourceLoadMap.h:
(WebKit::NetworkResourceLoadMap::hasUpload const):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::setWebProcessHasUploads):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::ProcessAssertion):
* UIProcess/ProcessAssertion.h:
(WebKit::ProcessAssertion::pid const):
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
* UIProcess/WebProcessProxy.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::remove):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
* WebProcess/Network/WebLoaderStrategy.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkConnectionToWebProcesscpp">trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkConnectionToWebProcessh">trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkResourceLoadMapcpp">trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.cpp</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessNetworkResourceLoadMaph">trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessNetworkNetworkProcessProxyh">trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessNetworkNetworkProcessProxymessagesin">trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKitUIProcessProcessAssertioncpp">trunk/Source/WebKit/UIProcess/ProcessAssertion.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessProcessAssertionh">trunk/Source/WebKit/UIProcess/ProcessAssertion.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebProcessPoolcpp">trunk/Source/WebKit/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebProcessPoolh">trunk/Source/WebKit/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebProcessPoolmessagesin">trunk/Source/WebKit/UIProcess/WebProcessPool.messages.in</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebProcessProxycpp">trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebProcessProxyh">trunk/Source/WebKit/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessNetworkWebLoaderStrategycpp">trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessNetworkWebLoaderStrategyh">trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/ChangeLog       2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2020-04-17  Chris Dumez  <cdumez@apple.com>
+
+        [iOS] Refactor WebKit uploads process assertion logic to minimize chances of leaking them
+        https://bugs.webkit.org/show_bug.cgi?id=210664
+        <rdar://problem/61751982>
+
+        Reviewed by Geoff Garen.
+
+        To minimize chances of leaking "WebKit uploads" process assertion, the following refactoring
+        was done:
+        1. WebKit upload assertions are now held by NetworkProcessProxy instead of the WebProcessPool.
+           This makes more sense since uploads are tied to a particular network process. In base of
+           a network process crash, we would not want those assertions to persist for example.
+        2. Store all upload assertions (UIProcess + NetworkProcess + WebProcesses) into a single
+           UploadActivity data structure that can easily be cleared. Make sure we clear it on network
+           process crash.
+        3. No longer on the WebProcess to send IPC whenever its has pending uploads or not. Instead,
+           have the network process send such IPC. This makes more sense, especially now that all
+           webkit upload process assertions are now stored on NetworkProcessProxy. It also makes it
+           so that we deal properly with WebProcess crashes. In case of a WebProcess crash, its
+           connection to the network process will get closed. NetworkConnectionToWebProcess::didClose()
+           gets called and causes all NetworkResourceLoader objects for this connection to get
+           destroyed. As a result, the network process will properly notify the UIProcess that this
+           process no longer has any upload in progress.
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
+        (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
+        (WebKit::NetworkConnectionToWebProcess::hasUploadStateChanged):
+        * NetworkProcess/NetworkConnectionToWebProcess.h:
+        * NetworkProcess/NetworkResourceLoadMap.cpp:
+        (WebKit::NetworkResourceLoadMap::NetworkResourceLoadMap):
+        (WebKit::NetworkResourceLoadMap::~NetworkResourceLoadMap):
+        (WebKit::NetworkResourceLoadMap::add):
+        (WebKit::NetworkResourceLoadMap::clear):
+        (WebKit::NetworkResourceLoadMap::take):
+        (WebKit::NetworkResourceLoadMap::setHasUpload):
+        * NetworkProcess/NetworkResourceLoadMap.h:
+        (WebKit::NetworkResourceLoadMap::hasUpload const):
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::didClose):
+        (WebKit::NetworkProcessProxy::setWebProcessHasUploads):
+        * UIProcess/Network/NetworkProcessProxy.h:
+        * UIProcess/Network/NetworkProcessProxy.messages.in:
+        * UIProcess/ProcessAssertion.cpp:
+        (WebKit::ProcessAssertion::ProcessAssertion):
+        * UIProcess/ProcessAssertion.h:
+        (WebKit::ProcessAssertion::pid const):
+        * UIProcess/WebProcessPool.cpp:
+        * UIProcess/WebProcessPool.h:
+        * UIProcess/WebProcessPool.messages.in:
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::~WebProcessProxy):
+        * UIProcess/WebProcessProxy.h:
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
+        (WebKit::WebLoaderStrategy::remove):
+        (WebKit::WebLoaderStrategy::loadResourceSynchronously):
+        * WebProcess/Network/WebLoaderStrategy.h:
+
</ins><span class="cx"> 2020-04-17  Jer Noble  <jer.noble@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Bring Fullscreen API + alert() behavior from iOS to macOS
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp     2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp        2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -105,6 +105,7 @@
</span><span class="cx">     : m_connection(IPC::Connection::createServerConnection(connectionIdentifier, *this))
</span><span class="cx">     , m_networkProcess(networkProcess)
</span><span class="cx">     , m_sessionID(sessionID)
</span><ins>+    , m_networkResourceLoaders([this](bool hasUpload) { hasUploadStateChanged(hasUpload); })
</ins><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">     , m_mdnsRegister(*this)
</span><span class="cx"> #endif
</span><span class="lines">@@ -131,6 +132,9 @@
</span><span class="cx"> 
</span><span class="cx">     m_connection->invalidate();
</span><span class="cx"> 
</span><ins>+    // This may call hasUploadStateChanged().
+    m_networkResourceLoaders.clear();
+
</ins><span class="cx">     for (auto& port : m_processEntangledPorts)
</span><span class="cx">         networkProcess().messagePortChannelRegistry().didCloseMessagePort(port);
</span><span class="cx"> 
</span><span class="lines">@@ -149,6 +153,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void NetworkConnectionToWebProcess::hasUploadStateChanged(bool hasUpload)
+{
+    RELEASE_LOG_IF_ALLOWED(Loading, "hasUploadStateChanged - WebProcess %llu - hasUpload: %d", webProcessIdentifier().toUInt64(), hasUpload);
+    m_networkProcess->parentProcessConnection()->send(Messages::NetworkProcessProxy::SetWebProcessHasUploads(m_webProcessIdentifier, hasUpload), 0);
+}
+
</ins><span class="cx"> void NetworkConnectionToWebProcess::didCleanupResourceLoader(NetworkResourceLoader& loader)
</span><span class="cx"> {
</span><span class="cx">     RELEASE_ASSERT(loader.identifier());
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkConnectionToWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h       2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h  2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -314,6 +314,8 @@
</span><span class="cx">     size_t findRootNetworkActivity(WebCore::PageIdentifier);
</span><span class="cx">     size_t findNetworkActivityTracker(ResourceLoadIdentifier resourceID);
</span><span class="cx"> 
</span><ins>+    void hasUploadStateChanged(bool);
+
</ins><span class="cx"> #if ENABLE(APPLE_PAY_REMOTE_UI)
</span><span class="cx">     WebPaymentCoordinatorProxy& paymentCoordinator();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkResourceLoadMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.cpp (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.cpp    2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.cpp       2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -29,10 +29,24 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><ins>+NetworkResourceLoadMap::NetworkResourceLoadMap(Function<void(bool hasUpload)>&& hasUploadChangeListener)
+    : m_hasUploadChangeListener(WTFMove(hasUploadChangeListener))
+{
+}
+
+NetworkResourceLoadMap::~NetworkResourceLoadMap()
+{
+    clear();
+}
+
</ins><span class="cx"> NetworkResourceLoadMap::MapType::AddResult NetworkResourceLoadMap::add(ResourceLoadIdentifier identifier, Ref<NetworkResourceLoader>&& loader)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_loaders.contains(identifier));
</span><del>-    return m_loaders.add(identifier, WTFMove(loader));
</del><ins>+    bool hasUpload = loader->originalRequest().hasUpload();
+    auto result = m_loaders.add(identifier, WTFMove(loader));
+    if (hasUpload)
+        setHasUpload(true);
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool NetworkResourceLoadMap::remove(ResourceLoadIdentifier identifier)
</span><span class="lines">@@ -40,11 +54,21 @@
</span><span class="cx">     return !!take(identifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void NetworkResourceLoadMap::clear()
+{
+    m_loaders.clear();
+    setHasUpload(false);
+}
+
</ins><span class="cx"> RefPtr<NetworkResourceLoader> NetworkResourceLoadMap::take(ResourceLoadIdentifier identifier)
</span><span class="cx"> {
</span><span class="cx">     auto loader = m_loaders.take(identifier);
</span><span class="cx">     if (!loader)
</span><span class="cx">         return nullptr;
</span><ins>+
+    if ((*loader)->originalRequest().hasUpload())
+        setHasUpload(WTF::anyOf(m_loaders.values(), [](auto& loader) { return loader->originalRequest().hasUpload(); }));
+
</ins><span class="cx">     return WTFMove(*loader);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -53,4 +77,14 @@
</span><span class="cx">     return m_loaders.get(identifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void NetworkResourceLoadMap::setHasUpload(bool hasUpload)
+{
+    if (m_hasUpload == hasUpload)
+        return;
+
+    m_hasUpload = hasUpload;
+    if (m_hasUploadChangeListener)
+        m_hasUploadChangeListener(m_hasUpload);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessNetworkResourceLoadMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.h (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.h      2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadMap.h 2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -42,11 +42,14 @@
</span><span class="cx"> class NetworkResourceLoadMap {
</span><span class="cx"> public:
</span><span class="cx">     typedef HashMap<ResourceLoadIdentifier, Ref<NetworkResourceLoader>> MapType;
</span><ins>+    NetworkResourceLoadMap(Function<void(bool hasUpload)>&&);
+    ~NetworkResourceLoadMap();
</ins><span class="cx"> 
</span><span class="cx">     bool isEmpty() const { return m_loaders.isEmpty(); }
</span><span class="cx">     bool contains(ResourceLoadIdentifier identifier) const { return m_loaders.contains(identifier); }
</span><span class="cx">     MapType::iterator begin() { return m_loaders.begin(); }
</span><span class="cx">     MapType::ValuesIteratorRange values() { return m_loaders.values(); }
</span><ins>+    void clear();
</ins><span class="cx"> 
</span><span class="cx">     MapType::AddResult add(ResourceLoadIdentifier, Ref<NetworkResourceLoader>&&);
</span><span class="cx">     NetworkResourceLoader* get(ResourceLoadIdentifier) const;
</span><span class="lines">@@ -53,8 +56,14 @@
</span><span class="cx">     bool remove(ResourceLoadIdentifier);
</span><span class="cx">     RefPtr<NetworkResourceLoader> take(ResourceLoadIdentifier);
</span><span class="cx"> 
</span><ins>+    bool hasUpload() const { return m_hasUpload; }
+
</ins><span class="cx"> private:
</span><ins>+    void setHasUpload(bool);
+
</ins><span class="cx">     MapType m_loaders;
</span><ins>+    bool m_hasUpload { false };
+    Function<void(bool hasUpload)> m_hasUploadChangeListener;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp    2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp       2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -274,6 +274,8 @@
</span><span class="cx">     m_syncAllCookiesActivity = nullptr;
</span><span class="cx">     m_syncAllCookiesCounter = 0;
</span><span class="cx"> 
</span><ins>+    m_uploadActivity = WTF::nullopt;
+
</ins><span class="cx">     // This will cause us to be deleted.
</span><span class="cx">     networkProcessCrashed();
</span><span class="cx"> }
</span><span class="lines">@@ -1355,16 +1357,42 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkProcessProxy::takeUploadAssertion()
</del><ins>+void NetworkProcessProxy::setWebProcessHasUploads(WebCore::ProcessIdentifier processID, bool hasUpload)
</ins><span class="cx"> {
</span><del>-    ASSERT(!m_uploadAssertion);
-    m_uploadAssertion = makeUnique<ProcessAssertion>(processIdentifier(), "WebKit uploads"_s, ProcessAssertionType::UnboundedNetworking);
-}
</del><ins>+    if (!hasUpload) {
+        if (!m_uploadActivity)
+            return;
</ins><span class="cx"> 
</span><del>-void NetworkProcessProxy::clearUploadAssertion()
-{
-    ASSERT(m_uploadAssertion);
-    m_uploadAssertion = nullptr;
</del><ins>+        auto assertion = m_uploadActivity->webProcessAssertions.take(processID);
+        if (!assertion)
+            return;
+
+        RELEASE_LOG(ProcessSuspension, "NetworkProcessProxy::setWebProcessHasUploads: Releasing upload assertion on behalf of WebProcess with PID %d", assertion->pid());
+
+        if (m_uploadActivity->webProcessAssertions.isEmpty()) {
+            RELEASE_LOG(ProcessSuspension, "NetworkProcessProxy::setWebProcessHasUploads: The number of uploads in progress is now zero. Releasing Networking and UI process assertions.");
+            m_uploadActivity = WTF::nullopt;
+        }
+        return;
+    }
+
+    auto* process = WebProcessProxy::processForIdentifier(processID);
+    if (!process)
+        return;
+
+    if (!m_uploadActivity) {
+        RELEASE_LOG(ProcessSuspension, "NetworkProcessProxy::setWebProcessHasUploads: The number of uploads in progress is now greater than 0. Taking Networking and UI process assertions.");
+        m_uploadActivity = UploadActivity {
+            makeUnique<ProcessAssertion>(getCurrentProcessID(), "WebKit uploads"_s, ProcessAssertionType::UnboundedNetworking),
+            makeUnique<ProcessAssertion>(processIdentifier(), "WebKit uploads"_s, ProcessAssertionType::UnboundedNetworking),
+            HashMap<WebCore::ProcessIdentifier, std::unique_ptr<ProcessAssertion>>()
+        };
+    }
+
+    m_uploadActivity->webProcessAssertions.ensure(processID, [&] {
+        RELEASE_LOG(ProcessSuspension, "NetworkProcessProxy::setWebProcessHasUploads: Taking upload assertion on behalf of WebProcess with PID %d", process->processIdentifier());
+        return makeUnique<ProcessAssertion>(process->processIdentifier(), "WebKit uploads"_s, ProcessAssertionType::UnboundedNetworking);
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkProcessProxy::testProcessIncomingSyncMessagesWhenWaitingForSyncReply(WebPageProxyIdentifier pageID, Messages::NetworkProcessProxy::TestProcessIncomingSyncMessagesWhenWaitingForSyncReply::DelayedReply&& reply)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessNetworkNetworkProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h      2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -201,9 +201,6 @@
</span><span class="cx">     void addSession(Ref<WebsiteDataStore>&&);
</span><span class="cx">     void removeSession(PAL::SessionID);
</span><span class="cx">     
</span><del>-    void takeUploadAssertion();
-    void clearUploadAssertion();
-    
</del><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">     void createSymLinkForFileUpgrade(const String& indexedDatabaseDirectory);
</span><span class="cx"> #endif
</span><span class="lines">@@ -255,6 +252,7 @@
</span><span class="cx">     void didFetchWebsiteData(CallbackID, const WebsiteData&);
</span><span class="cx">     void didDeleteWebsiteData(CallbackID);
</span><span class="cx">     void didDeleteWebsiteDataForOrigins(CallbackID);
</span><ins>+    void setWebProcessHasUploads(WebCore::ProcessIdentifier, bool);
</ins><span class="cx">     void logDiagnosticMessage(WebPageProxyIdentifier, const String& message, const String& description, WebCore::ShouldSample);
</span><span class="cx">     void logDiagnosticMessageWithResult(WebPageProxyIdentifier, const String& message, const String& description, uint32_t result, WebCore::ShouldSample);
</span><span class="cx">     void logDiagnosticMessageWithValue(WebPageProxyIdentifier, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample);
</span><span class="lines">@@ -311,8 +309,13 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     HashMap<PAL::SessionID, RefPtr<WebsiteDataStore>> m_websiteDataStores;
</span><del>-    
-    std::unique_ptr<ProcessAssertion> m_uploadAssertion;
</del><ins>+
+    struct UploadActivity {
+        std::unique_ptr<ProcessAssertion> uiAssertion;
+        std::unique_ptr<ProcessAssertion> networkAssertion;
+        HashMap<WebCore::ProcessIdentifier, std::unique_ptr<ProcessAssertion>> webProcessAssertions;
+    };
+    Optional<UploadActivity> m_uploadActivity;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessNetworkNetworkProcessProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in    2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in       2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -65,6 +65,8 @@
</span><span class="cx">     UnregisterServiceWorkerClientProcess(WebCore::ProcessIdentifier webProcessIdentifier, WebCore::ProcessIdentifier serviceWorkerProcessIdentifier)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    SetWebProcessHasUploads(WebCore::ProcessIdentifier processID, bool hasUpload)
+
</ins><span class="cx">     RequestStorageSpace(PAL::SessionID sessionID, struct WebCore::ClientOrigin origin, uint64_t quota, uint64_t currentSize, uint64_t spaceRequired) -> (Optional<uint64_t> newQuota) Async
</span><span class="cx">     
</span><span class="cx">     ResourceLoadDidSendRequest(WebKit::WebPageProxyIdentifier pageIdentifier, struct WebKit::ResourceLoadInfo resourceLoadInfo, WebCore::ResourceRequest request, Optional<IPC::FormDataReference> httpBody)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessProcessAssertioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ProcessAssertion.cpp (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ProcessAssertion.cpp       2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/ProcessAssertion.cpp  2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -32,8 +32,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-ProcessAssertion::ProcessAssertion(ProcessID, ASCIILiteral, ProcessAssertionType assertionType)
</del><ins>+ProcessAssertion::ProcessAssertion(ProcessID pid, ASCIILiteral, ProcessAssertionType assertionType)
</ins><span class="cx">     : m_assertionType(assertionType)
</span><ins>+    , m_pid(pid)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessProcessAssertionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ProcessAssertion.h (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ProcessAssertion.h 2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/ProcessAssertion.h    2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx">     Client* client() { return m_client; }
</span><span class="cx"> 
</span><span class="cx">     ProcessAssertionType type() const { return m_assertionType; }
</span><ins>+    ProcessID pid() const { return m_pid; }
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx"> protected:
</span><span class="lines">@@ -80,8 +81,8 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     const ProcessAssertionType m_assertionType;
</span><ins>+    const ProcessID m_pid;
</ins><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><del>-    const ProcessID m_pid;
</del><span class="cx">     RetainPtr<RBSAssertion> m_rbsAssertion;
</span><span class="cx">     RetainPtr<WKRBSAssertionDelegate> m_delegate;
</span><span class="cx">     RetainPtr<BKSProcessAssertion> m_bksAssertion; // Legacy.
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp    2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -2350,54 +2350,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebProcessPool::setWebProcessHasUploads(ProcessIdentifier processID)
-{
-    ASSERT(processID);
-    auto* process = WebProcessProxy::processForIdentifier(processID);
-    ASSERT(process);
-
-    if (!process)
-        return;
-
-    WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "setWebProcessHasUploads: Web process now has uploads in progress (process=%p, PID=%i)", process, process->processIdentifier());
-
-    if (m_processesWithUploads.isEmpty()) {
-        WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "setWebProcessHasUploads: The number of uploads in progress is now one. Taking Networking and UI process assertions.");
-
-        ensureNetworkProcess().takeUploadAssertion();
-        
-        ASSERT(!m_uiProcessUploadAssertion);
-        m_uiProcessUploadAssertion = makeUnique<ProcessAssertion>(getCurrentProcessID(), "WebKit uploads"_s, ProcessAssertionType::UnboundedNetworking);
-    }
-    
-    auto result = m_processesWithUploads.add(processID, nullptr);
-    ASSERT(result.isNewEntry);
-    result.iterator->value = makeUnique<ProcessAssertion>(process->processIdentifier(), "WebKit uploads"_s, ProcessAssertionType::UnboundedNetworking);
-}
-
-void WebProcessPool::clearWebProcessHasUploads(ProcessIdentifier processID)
-{
-    ASSERT(processID);
-    auto result = m_processesWithUploads.take(processID);
-    if (!result)
-        return;
-
-    auto* process = WebProcessProxy::processForIdentifier(processID);
-    ASSERT_UNUSED(process, process);
-    WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "clearWebProcessHasUploads: Web process no longer has uploads in progress (process=%p, PID=%i)", process, process->processIdentifier());
-
-    if (m_processesWithUploads.isEmpty()) {
-        WEBPROCESSPOOL_RELEASE_LOG(ProcessSuspension, "clearWebProcessHasUploads: The number of uploads in progress is now zero. Releasing Networking and UI process assertions.");
-
-        if (m_networkProcess)
-            m_networkProcess->clearUploadAssertion();
-        
-        ASSERT(m_uiProcessUploadAssertion);
-        m_uiProcessUploadAssertion = nullptr;
-    }
-    
-}
-
</del><span class="cx"> void WebProcessPool::setWebProcessIsPlayingAudibleMedia(WebCore::ProcessIdentifier processID)
</span><span class="cx"> {
</span><span class="cx">     auto* process = WebProcessProxy::processForIdentifier(processID);
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebProcessPool.h   2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h      2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -516,9 +516,6 @@
</span><span class="cx">     void setUserMessageHandler(Function<void(UserMessage&&, CompletionHandler<void(UserMessage&&)>&&)>&& handler) { m_userMessageHandler = WTFMove(handler); }
</span><span class="cx">     const Function<void(UserMessage&&, CompletionHandler<void(UserMessage&&)>&&)>& userMessageHandler() const { return m_userMessageHandler; }
</span><span class="cx"> #endif
</span><del>-    
-    void setWebProcessHasUploads(WebCore::ProcessIdentifier);
-    void clearWebProcessHasUploads(WebCore::ProcessIdentifier);
</del><span class="cx"> 
</span><span class="cx">     void setWebProcessIsPlayingAudibleMedia(WebCore::ProcessIdentifier);
</span><span class="cx">     void clearWebProcessIsPlayingAudibleMedia(WebCore::ProcessIdentifier);
</span><span class="lines">@@ -790,9 +787,6 @@
</span><span class="cx">     Function<void(UserMessage&&, CompletionHandler<void(UserMessage&&)>&&)> m_userMessageHandler;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    HashMap<WebCore::ProcessIdentifier, std::unique_ptr<ProcessAssertion>> m_processesWithUploads;
-    std::unique_ptr<ProcessAssertion> m_uiProcessUploadAssertion;
-
</del><span class="cx">     HashMap<WebCore::ProcessIdentifier, std::unique_ptr<ProcessAssertion>> m_processesPlayingAudibleMedia;
</span><span class="cx">     std::unique_ptr<ProcessAssertion> m_uiProcessMediaPlaybackAssertion;
</span><span class="cx">     std::unique_ptr<ProcessAssertion> m_gpuProcessMediaPlaybackAssertion;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebProcessPoolmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.messages.in (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebProcessPool.messages.in 2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.messages.in    2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -30,7 +30,4 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     ReportWebContentCPUTime(Seconds cpuTime, uint64_t activityState)
</span><del>-
-    SetWebProcessHasUploads(WebCore::ProcessIdentifier processID)
-    ClearWebProcessHasUploads(WebCore::ProcessIdentifier processID)
</del><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp        2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp   2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -215,9 +215,6 @@
</span><span class="cx">     RELEASE_ASSERT(isMainThreadOrCheckDisabled());
</span><span class="cx">     ASSERT(m_pageURLRetainCountMap.isEmpty());
</span><span class="cx"> 
</span><del>-    if (m_processPool)
-        m_processPool->clearWebProcessHasUploads(coreProcessIdentifier());
-
</del><span class="cx">     auto result = allProcesses().remove(coreProcessIdentifier());
</span><span class="cx">     ASSERT_UNUSED(result, result);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h  2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h     2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "AuxiliaryProcessProxy.h"
</span><span class="cx"> #include "BackgroundProcessResponsivenessTimer.h"
</span><span class="cx"> #include "MessageReceiverMap.h"
</span><ins>+#include "NetworkProcessProxy.h"
</ins><span class="cx"> #include "PluginInfoStore.h"
</span><span class="cx"> #include "ProcessLauncher.h"
</span><span class="cx"> #include "ProcessTerminationReason.h"
</span><span class="lines">@@ -78,7 +79,6 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class AudioSessionRoutingArbitratorProxy;
</span><del>-class NetworkProcessProxy;
</del><span class="cx"> class ObjCObjectGraph;
</span><span class="cx"> class PageClient;
</span><span class="cx"> class ProvisionalPageProxy;
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessNetworkWebLoaderStrategycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp     2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp        2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -397,12 +397,6 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto loader = WebResourceLoader::create(resourceLoader, trackingParameters);
</span><del>-    if (resourceLoader.originalRequest().hasUpload()) {
-        if (m_loadersWithUploads.isEmpty())
-            WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessPool::SetWebProcessHasUploads(Process::identifier()), 0);
-        m_loadersWithUploads.add(loader.ptr());
-    }
-
</del><span class="cx">     m_webResourceLoaders.set(identifier, WTFMove(loader));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -464,9 +458,6 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RemoveLoadIdentifier(identifier), 0);
</span><span class="cx"> 
</span><del>-    if (m_loadersWithUploads.remove(loader.get()) && m_loadersWithUploads.isEmpty())
-        WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessPool::ClearWebProcessHasUploads { Process::identifier() }, 0);
-
</del><span class="cx">     // It's possible that this WebResourceLoader might be just about to message back to the NetworkProcess (e.g. ContinueWillSendRequest)
</span><span class="cx">     // but there's no point in doing so anymore.
</span><span class="cx">     loader->detachFromCoreLoader();
</span><span class="lines">@@ -614,10 +605,6 @@
</span><span class="cx">     HangDetectionDisabler hangDetectionDisabler;
</span><span class="cx">     IPC::UnboundedSynchronousIPCScope unboundedSynchronousIPCScope;
</span><span class="cx"> 
</span><del>-    bool shouldNotifyOfUpload = request.hasUpload() && m_loadersWithUploads.isEmpty();
-    if (shouldNotifyOfUpload)
-        WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessPool::SetWebProcessHasUploads { Process::identifier() }, 0);
-
</del><span class="cx">     if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) {
</span><span class="cx">         WEBLOADERSTRATEGY_WITH_FRAMELOADER_RELEASE_LOG_ERROR_IF_ALLOWED("loadResourceSynchronously: failed sending synchronous network process message");
</span><span class="cx">         if (page)
</span><span class="lines">@@ -625,9 +612,6 @@
</span><span class="cx">         response = ResourceResponse();
</span><span class="cx">         error = internalError(request.url());
</span><span class="cx">     }
</span><del>-
-    if (shouldNotifyOfUpload)
-        WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessPool::ClearWebProcessHasUploads { Process::identifier() }, 0);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebLoaderStrategy::pageLoadCompleted(Page& page)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessNetworkWebLoaderStrategyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h (260282 => 260283)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h       2020-04-17 21:19:49 UTC (rev 260282)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h  2020-04-17 21:20:25 UTC (rev 260283)
</span><span class="lines">@@ -126,7 +126,6 @@
</span><span class="cx">     HashMap<unsigned long, PreconnectCompletionHandler> m_preconnectCompletionHandlers;
</span><span class="cx">     Vector<Function<void(bool)>> m_onlineStateChangeListeners;
</span><span class="cx">     bool m_isOnLine { true };
</span><del>-    HashSet<WebResourceLoader*> m_loadersWithUploads;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>