<!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>[206189] trunk/Source</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/206189">206189</a></dd>
<dt>Author</dt> <dd>krollin@apple.com</dd>
<dt>Date</dt> <dd>2016-09-20 17:27:17 -0700 (Tue, 20 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add new logging for network resource loading
https://bugs.webkit.org/show_bug.cgi?id=162237

Reviewed by Antti Koivisto.

Add new logging along the non-main path for resource loading. This
logging should allow us to differentiate between lack-of-logging due
execution along a path that doesn't have logging statements and
lack-of-logging due to a hung process.

Source/WebCore:

No new tests -- there are no tests for logging.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::isAlwaysOnLoggingAllowed):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::isAlwaysOnLoggingAllowed):
* loader/cache/CachedResourceLoader.h:
* page/Frame.h:

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::setDefersLoading):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
* NetworkProcess/NetworkResourceLoader.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::loadResource):
(WebKit::WebLoaderStrategy::scheduleLoad):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoaderh">trunk/Source/WebCore/loader/DocumentLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourcecpp">trunk/Source/WebCore/loader/cache/CachedResource.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoadercpp">trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoaderh">trunk/Source/WebCore/loader/cache/CachedResourceLoader.h</a></li>
<li><a href="#trunkSourceWebCorepageFrameh">trunk/Source/WebCore/page/Frame.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp">trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/ChangeLog        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2016-09-20  Keith Rollin  &lt;krollin@apple.com&gt;
+
+        Add new logging for network resource loading
+        https://bugs.webkit.org/show_bug.cgi?id=162237
+
+        Reviewed by Antti Koivisto.
+
+        Add new logging along the non-main path for resource loading. This
+        logging should allow us to differentiate between lack-of-logging due
+        execution along a path that doesn't have logging statements and
+        lack-of-logging due to a hung process.
+
+        No new tests -- there are no tests for logging.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::startLoadingMainResource):
+        (WebCore::DocumentLoader::isAlwaysOnLoggingAllowed):
+        * loader/DocumentLoader.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::load):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::requestResource):
+        (WebCore::CachedResourceLoader::isAlwaysOnLoggingAllowed):
+        * loader/cache/CachedResourceLoader.h:
+        * page/Frame.h:
+
</ins><span class="cx"> 2016-09-20  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r204552): Athlete search on Strava gives bad rendering.
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -81,6 +81,8 @@
</span><span class="cx"> #include &quot;ContentFilter.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, &quot;%p - DocumentLoader::&quot; fmt, this, ##__VA_ARGS__)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static void cancelAll(const ResourceLoaderMap&amp; loaders)
</span><span class="lines">@@ -1471,8 +1473,10 @@
</span><span class="cx">     ASSERT(!m_loadingMainResource);
</span><span class="cx">     m_loadingMainResource = true;
</span><span class="cx"> 
</span><del>-    if (maybeLoadEmpty())
</del><ins>+    if (maybeLoadEmpty()) {
+        RELEASE_LOG_IF_ALLOWED(&quot;startLoadingMainResource: Returning empty document (frame = %p, main = %d)&quot;, m_frame, m_frame-&gt;isMainFrame());
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><span class="cx">     m_contentFilter = !m_substituteData.isValid() ? ContentFilter::create(*this) : nullptr;
</span><span class="lines">@@ -1491,12 +1495,15 @@
</span><span class="cx">     willSendRequest(m_request, ResourceResponse());
</span><span class="cx"> 
</span><span class="cx">     // willSendRequest() may lead to our Frame being detached or cancelling the load via nulling the ResourceRequest.
</span><del>-    if (!m_frame || m_request.isNull())
</del><ins>+    if (!m_frame || m_request.isNull()) {
+        RELEASE_LOG_IF_ALLOWED(&quot;startLoadingMainResource: Load canceled after willSendRequest (frame = %p, main = %d)&quot;, m_frame, m_frame-&gt;isMainFrame());
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     m_applicationCacheHost-&gt;maybeLoadMainResource(m_request, m_substituteData);
</span><span class="cx"> 
</span><span class="cx">     if (m_substituteData.isValid() &amp;&amp; m_frame-&gt;page()) {
</span><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;startLoadingMainResource: Returning cached main resource (frame = %p, main = %d)&quot;, m_frame, m_frame-&gt;isMainFrame());
</ins><span class="cx">         m_identifierForLoadWithoutResourceLoader = m_frame-&gt;page()-&gt;progress().createUniqueIdentifier();
</span><span class="cx">         frameLoader()-&gt;notifier().assignIdentifierToInitialRequest(m_identifierForLoadWithoutResourceLoader, this, m_request);
</span><span class="cx">         frameLoader()-&gt;notifier().dispatchWillSendRequest(this, m_identifierForLoadWithoutResourceLoader, m_request, ResourceResponse());
</span><span class="lines">@@ -1509,11 +1516,14 @@
</span><span class="cx">     // If this is a reload the cache layer might have made the previous request conditional. DocumentLoader can't handle 304 responses itself.
</span><span class="cx">     request.makeUnconditional();
</span><span class="cx"> 
</span><ins>+    RELEASE_LOG_IF_ALLOWED(&quot;startLoadingMainResource: Starting load (frame = %p, main = %d)&quot;, m_frame, m_frame-&gt;isMainFrame());
+
</ins><span class="cx">     static NeverDestroyed&lt;ResourceLoaderOptions&gt; mainResourceLoadOptions(SendCallbacks, SniffContent, BufferData, AllowStoredCredentials, ClientCredentialPolicy::MayAskClientForCredentials, FetchOptions::Credentials::Include, SkipSecurityCheck, FetchOptions::Mode::NoCors, IncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::AllowCaching);
</span><span class="cx">     m_mainResource = m_cachedResourceLoader-&gt;requestMainResource(CachedResourceRequest(ResourceRequest(request), mainResourceLoadOptions));
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx">     if (m_mainResource &amp;&amp; m_mainResource-&gt;errorOccurred() &amp;&amp; m_frame-&gt;page() &amp;&amp; m_mainResource-&gt;resourceError().domain() == ContentExtensions::WebKitContentBlockerDomain) {
</span><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;startLoadingMainResource: Blocked by content blocker error (frame = %p, main = %d)&quot;, m_frame, m_frame-&gt;isMainFrame());
</ins><span class="cx">         cancelMainResourceLoad(frameLoader()-&gt;blockedByContentBlockerError(m_request));
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -1521,10 +1531,13 @@
</span><span class="cx"> 
</span><span class="cx">     if (!m_mainResource) {
</span><span class="cx">         if (!m_request.url().isValid()) {
</span><ins>+            RELEASE_LOG_IF_ALLOWED(&quot;startLoadingMainResource: Unable to load main resource, URL is invalid (frame = %p, main = %d)&quot;, m_frame, m_frame-&gt;isMainFrame());
</ins><span class="cx">             cancelMainResourceLoad(frameLoader()-&gt;client().cannotShowURLError(m_request));
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;startLoadingMainResource: Unable to load main resource, returning empty document (frame = %p, main = %d)&quot;, m_frame, m_frame-&gt;isMainFrame());
+
</ins><span class="cx">         setRequest(ResourceRequest());
</span><span class="cx">         // If the load was aborted by clearing m_request, it's possible the ApplicationCacheHost
</span><span class="cx">         // is now in a state where starting an empty load will be inconsistent. Replace it with
</span><span class="lines">@@ -1711,4 +1724,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+bool DocumentLoader::isAlwaysOnLoggingAllowed() const
+{
+    return m_frame ? m_frame-&gt;isAlwaysOnLoggingAllowed() : true;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.h (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.h        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/loader/DocumentLoader.h        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -286,6 +286,8 @@
</span><span class="cx">         ContentFilter* contentFilter() const;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+        bool isAlwaysOnLoggingAllowed() const;
+
</ins><span class="cx">     protected:
</span><span class="cx">         WEBCORE_EXPORT DocumentLoader(const ResourceRequest&amp;, const SubstituteData&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -2360,12 +2360,16 @@
</span><span class="cx">     
</span><span class="cx">     // The load might be cancelled inside of prepareForLoadStart(), nulling out the m_provisionalDocumentLoader, 
</span><span class="cx">     // so we need to null check it again.
</span><del>-    if (!m_provisionalDocumentLoader)
</del><ins>+    if (!m_provisionalDocumentLoader) {
+        RELEASE_LOG_IF_ALLOWED(&quot;continueLoadAfterWillSubmitForm: Frame load canceled (frame = %p, main = %d)&quot;, &amp;m_frame, m_frame.isMainFrame());
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     DocumentLoader* activeDocLoader = activeDocumentLoader();
</span><del>-    if (activeDocLoader &amp;&amp; activeDocLoader-&gt;isLoadingMainResource())
</del><ins>+    if (activeDocLoader &amp;&amp; activeDocLoader-&gt;isLoadingMainResource()) {
+        RELEASE_LOG_IF_ALLOWED(&quot;continueLoadAfterWillSubmitForm: Main frame already being loaded (frame = %p, main = %d)&quot;, &amp;m_frame, m_frame.isMainFrame());
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx">     m_loadingFromCachedPage = false;
</span><span class="cx">     m_provisionalDocumentLoader-&gt;startLoadingMainResource();
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.cpp        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -62,6 +62,8 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WTF;
</span><span class="cx"> 
</span><ins>+#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(cachedResourceLoader.isAlwaysOnLoggingAllowed(), Network, &quot;%p - CachedResource::&quot; fmt, this, ##__VA_ARGS__)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> ResourceLoadPriority CachedResource::defaultPriorityForResourceType(Type type)
</span><span class="lines">@@ -263,6 +265,7 @@
</span><span class="cx"> void CachedResource::load(CachedResourceLoader&amp; cachedResourceLoader)
</span><span class="cx"> {
</span><span class="cx">     if (!cachedResourceLoader.frame()) {
</span><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;load: No associated frame&quot;);
</ins><span class="cx">         failBeforeStarting();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -274,6 +277,7 @@
</span><span class="cx">     // cache.
</span><span class="cx">     if (auto* topDocument = frame.mainFrame().document()) {
</span><span class="cx">         if (topDocument-&gt;pageCacheState() != Document::NotInPageCache) {
</span><ins>+            RELEASE_LOG_IF_ALLOWED(&quot;load: Already in page cache or being added to it (frame = %p)&quot;, &amp;frame);
</ins><span class="cx">             failBeforeStarting();
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="lines">@@ -281,6 +285,12 @@
</span><span class="cx"> 
</span><span class="cx">     FrameLoader&amp; frameLoader = frame.loader();
</span><span class="cx">     if (m_options.securityCheck == DoSecurityCheck &amp;&amp; (frameLoader.state() == FrameStateProvisional || !frameLoader.activeDocumentLoader() || frameLoader.activeDocumentLoader()-&gt;isStopping())) {
</span><ins>+        if (frameLoader.state() == FrameStateProvisional)
+            RELEASE_LOG_IF_ALLOWED(&quot;load: Failed security check -- state is provisional (frame = %p)&quot;, &amp;frame);
+        else if (!frameLoader.activeDocumentLoader())
+            RELEASE_LOG_IF_ALLOWED(&quot;load: Failed security check -- not active document (frame = %p)&quot;, &amp;frame);
+        else if (frameLoader.activeDocumentLoader()-&gt;isStopping())
+            RELEASE_LOG_IF_ALLOWED(&quot;load: Failed security check -- active loader is stopping (frame = %p)&quot;, &amp;frame);
</ins><span class="cx">         failBeforeStarting();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -337,6 +347,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_loader = platformStrategies()-&gt;loaderStrategy()-&gt;loadResource(frame, *this, request, m_options);
</span><span class="cx">     if (!m_loader) {
</span><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;load: Unable to create SubresourceLoader (frame = %p)&quot;, &amp;frame);
</ins><span class="cx">         failBeforeStarting();
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -80,6 +80,8 @@
</span><span class="cx"> 
</span><span class="cx"> #define PRELOAD_DEBUG 0
</span><span class="cx"> 
</span><ins>+#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, &quot;%p - CachedResourceLoader::&quot; fmt, this, ##__VA_ARGS__)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static CachedResource* createResource(CachedResource::Type type, CachedResourceRequest&amp;&amp; request, SessionID sessionID)
</span><span class="lines">@@ -607,11 +609,15 @@
</span><span class="cx">     // If only the fragment identifiers differ, it is the same resource.
</span><span class="cx">     url = MemoryCache::removeFragmentIdentifierIfNeeded(url);
</span><span class="cx"> 
</span><del>-    if (!url.isValid())
</del><ins>+    if (!url.isValid()) {
+        RELEASE_LOG_IF_ALLOWED(&quot;requestResource: URL is invalid (frame = %p)&quot;, frame());
</ins><span class="cx">         return nullptr;
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-    if (!canRequest(type, url, request.options(), request.forPreload()))
</del><ins>+    if (!canRequest(type, url, request.options(), request.forPreload())) {
+        RELEASE_LOG_IF_ALLOWED(&quot;requestResource: Not allowed to request resource (frame = %p)&quot;, frame());
</ins><span class="cx">         return nullptr;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx">     if (frame() &amp;&amp; frame()-&gt;mainFrame().page() &amp;&amp; m_documentLoader) {
</span><span class="lines">@@ -619,6 +625,7 @@
</span><span class="cx">         auto blockedStatus = frame()-&gt;mainFrame().page()-&gt;userContentProvider().processContentExtensionRulesForLoad(resourceRequest.url(), toResourceType(type), *m_documentLoader);
</span><span class="cx">         applyBlockedStatusToRequest(blockedStatus, resourceRequest);
</span><span class="cx">         if (blockedStatus.blockedLoad) {
</span><ins>+            RELEASE_LOG_IF_ALLOWED(&quot;requestResource: Resource blocked by content blocker (frame = %p)&quot;, frame());
</ins><span class="cx">             if (type == CachedResource::Type::MainResource) {
</span><span class="cx">                 auto resource = createResource(type, WTFMove(request), sessionID());
</span><span class="cx">                 ASSERT(resource);
</span><span class="lines">@@ -1290,4 +1297,9 @@
</span><span class="cx">     return options;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool CachedResourceLoader::isAlwaysOnLoggingAllowed() const
+{
+    return m_documentLoader ? m_documentLoader-&gt;isAlwaysOnLoggingAllowed() : true;
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.h (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.h        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.h        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -145,6 +145,8 @@
</span><span class="cx">     ResourceTimingInformation&amp; resourceTimingInformation() { return m_resourceTimingInfo; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    bool isAlwaysOnLoggingAllowed() const;
+
</ins><span class="cx"> private:
</span><span class="cx">     explicit CachedResourceLoader(DocumentLoader*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Frame.h (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Frame.h        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebCore/page/Frame.h        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx">         bool activeDOMObjectsAndAnimationsSuspended() const { return m_activeDOMObjectsAndAnimationsSuspendedCount &gt; 0; }
</span><span class="cx"> 
</span><span class="cx">         bool isURLAllowed(const URL&amp;) const;
</span><del>-        bool isAlwaysOnLoggingAllowed() const;
</del><ins>+        WEBCORE_EXPORT bool isAlwaysOnLoggingAllowed() const;
</ins><span class="cx"> 
</span><span class="cx">     // ========
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebKit2/ChangeLog        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-09-20  Keith Rollin  &lt;krollin@apple.com&gt;
+
+        Add new logging for network resource loading
+        https://bugs.webkit.org/show_bug.cgi?id=162237
+
+        Reviewed by Antti Koivisto.
+
+        Add new logging along the non-main path for resource loading. This
+        logging should allow us to differentiate between lack-of-logging due
+        execution along a path that doesn't have logging statements and
+        lack-of-logging due to a hung process.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::start):
+        (WebKit::NetworkResourceLoader::startNetworkLoad):
+        (WebKit::NetworkResourceLoader::setDefersLoading):
+        (WebKit::NetworkResourceLoader::abort):
+        (WebKit::NetworkResourceLoader::didReceiveBuffer):
+        * NetworkProcess/NetworkResourceLoader.h:
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::loadResource):
+        (WebKit::WebLoaderStrategy::scheduleLoad):
+
</ins><span class="cx"> 2016-09-20  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Can't present a payment sheet if a sheet is already active in another window
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -148,11 +148,14 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><del>-    if (m_defersLoading)
</del><ins>+    if (m_defersLoading) {
+        RELEASE_LOG_IF_ALLOWED(&quot;start: Loading is deferred (pageID = %llu, frameID = %llu, resourceID = %llu, isMainResource = %d, isSynchronous = %d)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous());
</ins><span class="cx">         return;
</span><ins>+    }
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(NETWORK_CACHE)
</span><span class="cx">     if (canUseCache(originalRequest())) {
</span><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;start: Retrieving resource from cache (pageID = %llu, frameID = %llu, resourceID = %llu, isMainResource = %d, isSynchronous = %d)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous());
</ins><span class="cx">         retrieveCacheEntry(originalRequest());
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -195,6 +198,8 @@
</span><span class="cx"> 
</span><span class="cx"> void NetworkResourceLoader::startNetworkLoad(const ResourceRequest&amp; request)
</span><span class="cx"> {
</span><ins>+    RELEASE_LOG_IF_ALLOWED(&quot;startNetworkLoad: (pageID = %llu, frameID = %llu, resourceID = %llu, isMainResource = %d, isSynchronous = %d)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous());
+
</ins><span class="cx">     consumeSandboxExtensions();
</span><span class="cx"> 
</span><span class="cx">     if (isSynchronous() || m_parameters.maximumBufferingTime &gt; 0ms)
</span><span class="lines">@@ -205,8 +210,6 @@
</span><span class="cx">         m_bufferedDataForCache = SharedBuffer::create();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    RELEASE_LOG_IF_ALLOWED(&quot;startNetworkLoad: (pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d)&quot;, m_parameters.webPageID, m_parameters.webFrameID, isMainResource(), isSynchronous());
-
</del><span class="cx">     NetworkLoadParameters parameters = m_parameters;
</span><span class="cx">     parameters.defersLoading = m_defersLoading;
</span><span class="cx">     parameters.request = request;
</span><span class="lines">@@ -215,6 +218,7 @@
</span><span class="cx">     auto* networkSession = SessionTracker::networkSession(parameters.sessionID);
</span><span class="cx">     if (!networkSession) {
</span><span class="cx">         WTFLogAlways(&quot;Attempted to create a NetworkLoad with a session (id=%&quot; PRIu64 &quot;) that does not exist.&quot;, parameters.sessionID.sessionID());
</span><ins>+        RELEASE_LOG_IF_ALLOWED(&quot;startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %llu, frameID = %llu, resourceID = %llu, sessionID=%llu)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, parameters.sessionID.sessionID());
</ins><span class="cx">         didFailLoading(internalError(request.url()));
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -222,6 +226,11 @@
</span><span class="cx"> #else
</span><span class="cx">     m_networkLoad = std::make_unique&lt;NetworkLoad&gt;(*this, WTFMove(parameters));
</span><span class="cx"> #endif
</span><ins>+
+    if (m_defersLoading) {
+        RELEASE_LOG_IF_ALLOWED(&quot;startNetworkLoad: Created, but deferred (pageID = %llu, frameID = %llu, resourceID = %llu)&quot;,
+            m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkResourceLoader::setDefersLoading(bool defers)
</span><span class="lines">@@ -230,6 +239,11 @@
</span><span class="cx">         return;
</span><span class="cx">     m_defersLoading = defers;
</span><span class="cx"> 
</span><ins>+    if (defers)
+        RELEASE_LOG_IF_ALLOWED(&quot;setDefersLoading: Deferring resource load (pageID = %llu, frameID = %llu, resourceID = %llu)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
+    else
+        RELEASE_LOG_IF_ALLOWED(&quot;setDefersLoading: Resuming deferred resource load (pageID = %llu, frameID = %llu, resourceID = %llu)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
+
</ins><span class="cx">     if (m_networkLoad) {
</span><span class="cx">         m_networkLoad-&gt;setDefersLoading(defers);
</span><span class="cx">         return;
</span><span class="lines">@@ -237,6 +251,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (!m_defersLoading)
</span><span class="cx">         start();
</span><ins>+    else
+        RELEASE_LOG_IF_ALLOWED(&quot;setDefersLoading: defers = TRUE, but nothing to stop (pageID = %llu, frameID = %llu, resourceID = %llu)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkResourceLoader::cleanup()
</span><span class="lines">@@ -273,6 +289,9 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><ins>+    RELEASE_LOG_IF_ALLOWED(&quot;abort: Canceling resource load (pageID = %llu, frameID = %llu, resourceID = %llu)&quot;,
+        m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
+
</ins><span class="cx">     if (m_networkLoad &amp;&amp; !m_didConvertToDownload) {
</span><span class="cx"> #if ENABLE(NETWORK_CACHE)
</span><span class="cx">         if (canUseCache(m_networkLoad-&gt;currentRequest())) {
</span><span class="lines">@@ -320,10 +339,8 @@
</span><span class="cx">     if (shouldSendDidReceiveResponse) {
</span><span class="cx">         if (isSynchronous())
</span><span class="cx">             m_synchronousLoadData-&gt;response = m_response;
</span><del>-        else {
-            RELEASE_LOG_IF_ALLOWED(&quot;didReceiveResponse: Sending didReceiveResponse message to the WebContent process (pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d)&quot;, static_cast&lt;unsigned long long&gt;(m_parameters.webPageID), static_cast&lt;unsigned long long&gt;(m_parameters.webFrameID), isMainResource(), isSynchronous());
</del><ins>+        else
</ins><span class="cx">             send(Messages::WebResourceLoader::DidReceiveResponse(m_response, shouldWaitContinueDidReceiveResponse));
</span><del>-        }
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // For main resources, the web process is responsible for sending back a NetworkResourceLoader::ContinueDidReceiveResponse message.
</span><span class="lines">@@ -343,6 +360,11 @@
</span><span class="cx"> 
</span><span class="cx"> void NetworkResourceLoader::didReceiveBuffer(Ref&lt;SharedBuffer&gt;&amp;&amp; buffer, int reportedEncodedDataLength)
</span><span class="cx"> {
</span><ins>+    if (!m_hasReceivedData) {
+        RELEASE_LOG_IF_ALLOWED(&quot;didReceiveBuffer: Started receiving data (pageID = %llu, frameID = %llu, resourceID = %llu)&quot;, m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier);
+        m_hasReceivedData = true;
+    }
+
</ins><span class="cx"> #if ENABLE(NETWORK_CACHE)
</span><span class="cx">     ASSERT(!m_cacheEntryForValidation);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -153,6 +153,7 @@
</span><span class="cx">     bool m_didConvertToDownload { false };
</span><span class="cx">     bool m_didConsumeSandboxExtensions { false };
</span><span class="cx">     bool m_defersLoading { false };
</span><ins>+    bool m_hasReceivedData { false };
</ins><span class="cx"> 
</span><span class="cx">     WebCore::Timer m_bufferingTimer;
</span><span class="cx"> #if ENABLE(NETWORK_CACHE)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (206188 => 206189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp        2016-09-21 00:25:07 UTC (rev 206188)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp        2016-09-21 00:27:17 UTC (rev 206189)
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><del>-#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), Network, &quot;%p - WebLoaderStrategy::&quot; fmt, this, ##__VA_ARGS__)
-#define RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), Network, &quot;%p - WebLoaderStrategy::&quot; fmt, this, ##__VA_ARGS__)
</del><ins>+#define RELEASE_LOG_IF_ALLOWED(permissionChecker, fmt, ...) RELEASE_LOG_IF(permissionChecker.isAlwaysOnLoggingAllowed(), Network, &quot;%p - WebLoaderStrategy::&quot; fmt, this, ##__VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(permissionChecker, fmt, ...) RELEASE_LOG_ERROR_IF(permissionChecker.isAlwaysOnLoggingAllowed(), Network, &quot;%p - WebLoaderStrategy::&quot; fmt, this, ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -76,6 +76,8 @@
</span><span class="cx">     RefPtr&lt;SubresourceLoader&gt; loader = SubresourceLoader::create(frame, resource, request, options);
</span><span class="cx">     if (loader)
</span><span class="cx">         scheduleLoad(*loader, &amp;resource, frame.document()-&gt;referrerPolicy() == ReferrerPolicy::Default);
</span><ins>+    else
+        RELEASE_LOG_ERROR_IF_ALLOWED(frame, &quot;loadResource: Unable to create SubresourceLoader (frame = %p&quot;, &amp;frame);
</ins><span class="cx">     return loader;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -149,6 +151,7 @@
</span><span class="cx">     // then we should remember the ResourceLoader in our records but not schedule it in the NetworkProcess.
</span><span class="cx">     if (resourceLoader.documentLoader()-&gt;scheduleArchiveLoad(resourceLoader, resourceLoader.request())) {
</span><span class="cx">         LOG(NetworkScheduling, &quot;(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as an archive resource.&quot;, resourceLoader.url().string().utf8().data());
</span><ins>+        RELEASE_LOG_IF_ALLOWED(resourceLoader, &quot;scheduleLoad: URL will be handled as an archive resource (frame = %p, resourceID = %llu)&quot;, resourceLoader.frame(), identifier);
</ins><span class="cx">         m_webResourceLoaders.set(identifier, WebResourceLoader::create(resourceLoader, trackingParameters));
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -156,6 +159,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (resourceLoader.documentLoader()-&gt;applicationCacheHost()-&gt;maybeLoadResource(resourceLoader, resourceLoader.request(), resourceLoader.request().url())) {
</span><span class="cx">         LOG(NetworkScheduling, &quot;(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be loaded from application cache.&quot;, resourceLoader.url().string().utf8().data());
</span><ins>+        RELEASE_LOG_IF_ALLOWED(resourceLoader, &quot;scheduleLoad: URL will be loaded from application cache (frame = %p, resourceID = %llu)&quot;, resourceLoader.frame(), identifier);
</ins><span class="cx">         m_webResourceLoaders.set(identifier, WebResourceLoader::create(resourceLoader, trackingParameters));
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -162,6 +166,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (resourceLoader.request().url().protocolIsData()) {
</span><span class="cx">         LOG(NetworkScheduling, &quot;(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be loaded as data.&quot;, resourceLoader.url().string().utf8().data());
</span><ins>+        RELEASE_LOG_IF_ALLOWED(resourceLoader, &quot;scheduleLoad: URL will be loaded as data (frame = %p, resourceID = %llu)&quot;, resourceLoader.frame(), identifier);
</ins><span class="cx">         startLocalLoad(resourceLoader);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -169,6 +174,7 @@
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">     if (resourceLoader.request().url().protocolIs(QLPreviewProtocol())) {
</span><span class="cx">         LOG(NetworkScheduling, &quot;(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as a QuickLook resource.&quot;, resourceLoader.url().string().utf8().data());
</span><ins>+        RELEASE_LOG_IF_ALLOWED(resourceLoader, &quot;scheduleLoad: URL will be handled as a QuickLook resource (frame = %p, resourceID = %llu)&quot;, resourceLoader.frame(), identifier);
</ins><span class="cx">         startLocalLoad(resourceLoader);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -179,6 +185,7 @@
</span><span class="cx">     // https://blogs.gnome.org/alexl/2012/01/26/resources-in-glib/
</span><span class="cx">     if (resourceLoader.request().url().protocolIs(&quot;resource&quot;)) {
</span><span class="cx">         LOG(NetworkScheduling, &quot;(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as a GResource.&quot;, resourceLoader.url().string().utf8().data());
</span><ins>+        RELEASE_LOG_IF_ALLOWED(resourceLoader, &quot;scheduleLoad: URL will be handled as a GResource (frame = %p, resourceID = %llu)&quot;, resourceLoader.frame(), identifier);
</ins><span class="cx">         startLocalLoad(resourceLoader);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -207,7 +214,7 @@
</span><span class="cx">     ASSERT((loadParameters.webPageID &amp;&amp; loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials);
</span><span class="cx"> 
</span><span class="cx">     if (!WebProcess::singleton().networkConnection().connection().send(Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad(loadParameters), 0)) {
</span><del>-        RELEASE_LOG_ERROR_IF_ALLOWED(&quot;scheduleLoad: Unable to schedule resource with the NetworkProcess (frame = %p, priority = %d, pageID = %llu, frameID = %llu, resourceID = %llu)&quot;, resourceLoader.frame(), static_cast&lt;int&gt;(resourceLoader.request().priority()), loadParameters.webPageID, loadParameters.identifier, loadParameters.webFrameID);
</del><ins>+        RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, &quot;scheduleLoad: Unable to schedule resource with the NetworkProcess (frame = %p, priority = %d, pageID = %llu, frameID = %llu, resourceID = %llu)&quot;, resourceLoader.frame(), static_cast&lt;int&gt;(resourceLoader.request().priority()), loadParameters.webPageID, loadParameters.identifier, loadParameters.webFrameID);
</ins><span class="cx">         // We probably failed to schedule this load with the NetworkProcess because it had crashed.
</span><span class="cx">         // This load will never succeed so we will schedule it to fail asynchronously.
</span><span class="cx">         scheduleInternallyFailedLoad(resourceLoader);
</span><span class="lines">@@ -215,7 +222,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto webResourceLoader = WebResourceLoader::create(resourceLoader, trackingParameters);
</span><del>-    RELEASE_LOG_IF_ALLOWED(&quot;scheduleLoad: Resource has been queued for scheduling with the NetworkProcess (frame = %p, priority = %d, pageID = %llu, frameID = %llu, resourceID = %llu, WebResourceLoader = %p)&quot;, resourceLoader.frame(), static_cast&lt;int&gt;(resourceLoader.request().priority()), loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier, webResourceLoader.ptr());
</del><ins>+    RELEASE_LOG_IF_ALLOWED(resourceLoader, &quot;scheduleLoad: Resource has been queued for scheduling with the NetworkProcess (frame = %p, priority = %d, pageID = %llu, frameID = %llu, resourceID = %llu, WebResourceLoader = %p)&quot;, resourceLoader.frame(), static_cast&lt;int&gt;(resourceLoader.request().priority()), loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier, webResourceLoader.ptr());
</ins><span class="cx">     m_webResourceLoaders.set(identifier, WTFMove(webResourceLoader));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>