<!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>[209687] trunk/Source/WebCore</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/209687">209687</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-12-11 15:40:15 -0800 (Sun, 11 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Cleanup some InspectorInstrumentation network loading notifications
https://bugs.webkit.org/show_bug.cgi?id=165688

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2016-12-11
Reviewed by Brian Burg.

Eliminate InspectorInstrumentation::willReceiveResourceResponse by folding
it into InspectorInstrumentation::didReceiveResourceResponse. Simplify other
related InspectorInstrumentation calls by using references and using more
consistent InspectorInstrumentation patterns.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): Deleted.
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl): Deleted.
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl): Deleted.
(WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl): Deleted.
(WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
(WebCore::InspectorInstrumentation::continueWithPolicyDownload):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
(WebCore::InspectorInstrumentation::willReceiveResourceResponse): Deleted.
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
(WebCore::DocumentLoader::continueAfterContentPolicy):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationcpp">trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationh">trunk/Source/WebCore/inspector/InspectorInstrumentation.h</a></li>
<li><a href="#trunkSourceWebCoreloaderCrossOriginPreflightCheckercpp">trunk/Source/WebCore/loader/CrossOriginPreflightChecker.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderDocumentLoadercpp">trunk/Source/WebCore/loader/DocumentLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadNotifiercpp">trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp">trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209686 => 209687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-11 23:37:11 UTC (rev 209686)
+++ trunk/Source/WebCore/ChangeLog        2016-12-11 23:40:15 UTC (rev 209687)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2016-12-11  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Cleanup some InspectorInstrumentation network loading notifications
+        https://bugs.webkit.org/show_bug.cgi?id=165688
+
+        Reviewed by Brian Burg.
+
+        Eliminate InspectorInstrumentation::willReceiveResourceResponse by folding
+        it into InspectorInstrumentation::didReceiveResourceResponse. Simplify other
+        related InspectorInstrumentation calls by using references and using more
+        consistent InspectorInstrumentation patterns.
+
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
+        (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): Deleted.
+        (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl): Deleted.
+        (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl): Deleted.
+        (WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl): Deleted.
+        (WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl): Deleted.
+        * inspector/InspectorInstrumentation.h:
+        (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
+        (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
+        (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
+        (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
+        (WebCore::InspectorInstrumentation::willReceiveResourceResponse): Deleted.
+        * loader/CrossOriginPreflightChecker.cpp:
+        (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
+        (WebCore::DocumentLoader::continueAfterContentPolicy):
+        * loader/ResourceLoadNotifier.cpp:
+        (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+        * loader/appcache/ApplicationCacheGroup.cpp:
+        (WebCore::ApplicationCacheGroup::didReceiveResponse):
+
</ins><span class="cx"> 2016-12-11  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [MediaStream] Protect MediaDevicesRequest during callback
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (209686 => 209687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2016-12-11 23:37:11 UTC (rev 209686)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2016-12-11 23:40:15 UTC (rev 209687)
</span><span class="lines">@@ -582,21 +582,11 @@
</span><span class="cx">         networkAgent-&gt;didLoadResourceFromMemoryCache(*loader, *cachedResource);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceResponseImpl(InstrumentingAgents&amp; instrumentingAgents)
</del><ins>+void InspectorInstrumentation::didReceiveResourceResponseImpl(InstrumentingAgents&amp; instrumentingAgents, unsigned long identifier, DocumentLoader* loader, const ResourceResponse&amp; response, ResourceLoader* resourceLoader)
</ins><span class="cx"> {
</span><del>-    return InspectorInstrumentationCookie(instrumentingAgents, 0);
-}
-
-void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorInstrumentationCookie&amp; cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse&amp; response, ResourceLoader* resourceLoader)
-{
-    if (!cookie.isValid())
-        return;
-
</del><span class="cx">     if (!loader)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    InstrumentingAgents&amp; instrumentingAgents = *cookie.instrumentingAgents();
-
</del><span class="cx">     if (InspectorNetworkAgent* networkAgent = instrumentingAgents.inspectorNetworkAgent())
</span><span class="cx">         networkAgent-&gt;didReceiveResponse(identifier, *loader, response, resourceLoader);
</span><span class="cx">     if (WebConsoleAgent* consoleAgent = instrumentingAgents.webConsoleAgent())
</span><span class="lines">@@ -603,30 +593,6 @@
</span><span class="cx">         consoleAgent-&gt;didReceiveResponse(identifier, response); // This should come AFTER resource notification, front-end relies on this.
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
-{
-    if (!frame)
-        return;
-
-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(frame);
-    InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, &amp;loader, r, nullptr);
-}
-
-void InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
-{
-    didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
-}
-
-void InspectorInstrumentation::continueWithPolicyDownloadImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
-{
-    didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
-}
-
-void InspectorInstrumentation::continueWithPolicyIgnoreImpl(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
-{
-    didReceiveResourceResponseButCanceledImpl(frame, loader, identifier, r);
-}
-
</del><span class="cx"> void InspectorInstrumentation::didReceiveThreadableLoaderResponseImpl(InstrumentingAgents&amp; instrumentingAgents, DocumentThreadableLoader&amp; documentThreadableLoader, unsigned long identifier)
</span><span class="cx"> {
</span><span class="cx">     if (InspectorNetworkAgent* networkAgent = instrumentingAgents.inspectorNetworkAgent())
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (209686 => 209687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h        2016-12-11 23:37:11 UTC (rev 209686)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h        2016-12-11 23:40:15 UTC (rev 209687)
</span><span class="lines">@@ -154,15 +154,15 @@
</span><span class="cx">     static void continueAfterPingLoader(Frame&amp;, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp;);
</span><span class="cx">     static void markResourceAsCached(Page&amp;, unsigned long identifier);
</span><span class="cx">     static void didLoadResourceFromMemoryCache(Page&amp;, DocumentLoader*, CachedResource*);
</span><del>-    static InspectorInstrumentationCookie willReceiveResourceResponse(Frame*);
-    static void didReceiveResourceResponse(const InspectorInstrumentationCookie&amp;, unsigned long identifier, DocumentLoader*, const ResourceResponse&amp;, ResourceLoader*);
-    static void continueAfterXFrameOptionsDenied(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyDownload(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyIgnore(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
</del><ins>+    static void didReceiveResourceResponse(Frame&amp;, unsigned long identifier, DocumentLoader*, const ResourceResponse&amp;, ResourceLoader*);
</ins><span class="cx">     static void didReceiveThreadableLoaderResponse(DocumentThreadableLoader&amp;, unsigned long identifier);
</span><span class="cx">     static void didReceiveData(Frame*, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
</span><span class="cx">     static void didFinishLoading(Frame*, DocumentLoader*, unsigned long identifier, double finishTime);
</span><span class="cx">     static void didFailLoading(Frame*, DocumentLoader*, unsigned long identifier, const ResourceError&amp;);
</span><ins>+    static void continueAfterXFrameOptionsDenied(Frame&amp;, unsigned long identifier, DocumentLoader&amp;, const ResourceResponse&amp;);
+    static void continueWithPolicyDownload(Frame&amp;, unsigned long identifier, DocumentLoader&amp;, const ResourceResponse&amp;);
+    static void continueWithPolicyIgnore(Frame&amp;, unsigned long identifier, DocumentLoader&amp;, const ResourceResponse&amp;);
+
</ins><span class="cx">     static void didFinishXHRLoading(ScriptExecutionContext*, unsigned long identifier, std::optional&lt;String&gt; decodedText, const String&amp; url, const String&amp; sendURL, unsigned sendLineNumber, unsigned sendColumnNumber);
</span><span class="cx">     static void willLoadXHRSynchronously(ScriptExecutionContext*);
</span><span class="cx">     static void didLoadXHRSynchronously(ScriptExecutionContext*);
</span><span class="lines">@@ -324,12 +324,7 @@
</span><span class="cx">     static void continueAfterPingLoaderImpl(InstrumentingAgents&amp;, unsigned long identifier, DocumentLoader*, ResourceRequest&amp;, const ResourceResponse&amp;);
</span><span class="cx">     static void markResourceAsCachedImpl(InstrumentingAgents&amp;, unsigned long identifier);
</span><span class="cx">     static void didLoadResourceFromMemoryCacheImpl(InstrumentingAgents&amp;, DocumentLoader*, CachedResource*);
</span><del>-    static InspectorInstrumentationCookie willReceiveResourceResponseImpl(InstrumentingAgents&amp;);
-    static void didReceiveResourceResponseImpl(const InspectorInstrumentationCookie&amp;, unsigned long identifier, DocumentLoader*, const ResourceResponse&amp;, ResourceLoader*);
-    static void didReceiveResourceResponseButCanceledImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueAfterXFrameOptionsDeniedImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyDownloadImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
-    static void continueWithPolicyIgnoreImpl(Frame*, DocumentLoader&amp;, unsigned long identifier, const ResourceResponse&amp;);
</del><ins>+    static void didReceiveResourceResponseImpl(InstrumentingAgents&amp;, unsigned long identifier, DocumentLoader*, const ResourceResponse&amp;, ResourceLoader*);
</ins><span class="cx">     static void didReceiveThreadableLoaderResponseImpl(InstrumentingAgents&amp;, DocumentThreadableLoader&amp;, unsigned long identifier);
</span><span class="cx">     static void didReceiveDataImpl(InstrumentingAgents&amp;, unsigned long identifier, const char* data, int dataLength, int encodedDataLength);
</span><span class="cx">     static void didFinishLoadingImpl(InstrumentingAgents&amp;, unsigned long identifier, DocumentLoader*, double finishTime);
</span><span class="lines">@@ -850,37 +845,12 @@
</span><span class="cx">     didLoadResourceFromMemoryCacheImpl(instrumentingAgentsForPage(page), loader, resource);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceResponse(Frame* frame)
</del><ins>+inline void InspectorInstrumentation::didReceiveResourceResponse(Frame&amp; frame, unsigned long identifier, DocumentLoader* loader, const ResourceResponse&amp; response, ResourceLoader* resourceLoader)
</ins><span class="cx"> {
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
</span><del>-        return willReceiveResourceResponseImpl(*instrumentingAgents);
-    return InspectorInstrumentationCookie();
</del><ins>+        didReceiveResourceResponseImpl(*instrumentingAgents, identifier, loader, response, resourceLoader);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void InspectorInstrumentation::didReceiveResourceResponse(const InspectorInstrumentationCookie&amp; cookie, unsigned long identifier, DocumentLoader* loader, const ResourceResponse&amp; response, ResourceLoader* resourceLoader)
-{
-    // Call this unconditionally so that we're able to log to console with no front-end attached.
-    didReceiveResourceResponseImpl(cookie, identifier, loader, response, resourceLoader);
-}
-
-inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
-{
-    FAST_RETURN_IF_NO_FRONTENDS(void());
-    InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl(frame, loader, identifier, r);
-}
-
-inline void InspectorInstrumentation::continueWithPolicyDownload(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
-{
-    FAST_RETURN_IF_NO_FRONTENDS(void());
-    InspectorInstrumentation::continueWithPolicyDownloadImpl(frame, loader, identifier, r);
-}
-
-inline void InspectorInstrumentation::continueWithPolicyIgnore(Frame* frame, DocumentLoader&amp; loader, unsigned long identifier, const ResourceResponse&amp; r)
-{
-    FAST_RETURN_IF_NO_FRONTENDS(void());
-    InspectorInstrumentation::continueWithPolicyIgnoreImpl(frame, loader, identifier, r);
-}
-
</del><span class="cx"> inline void InspectorInstrumentation::didReceiveThreadableLoaderResponse(DocumentThreadableLoader&amp; documentThreadableLoader, unsigned long identifier)
</span><span class="cx"> {
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(documentThreadableLoader.document()))
</span><span class="lines">@@ -905,6 +875,27 @@
</span><span class="cx">         didFailLoadingImpl(*instrumentingAgents, identifier, loader, error);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void InspectorInstrumentation::continueAfterXFrameOptionsDenied(Frame&amp; frame, unsigned long identifier, DocumentLoader&amp; loader, const ResourceResponse&amp; response)
+{
+    // Treat the same as didReceiveResponse.
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        didReceiveResourceResponseImpl(*instrumentingAgents, identifier, &amp;loader, response, nullptr);
+}
+
+inline void InspectorInstrumentation::continueWithPolicyDownload(Frame&amp; frame, unsigned long identifier, DocumentLoader&amp; loader, const ResourceResponse&amp; response)
+{
+    // Treat the same as didReceiveResponse.
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        didReceiveResourceResponseImpl(*instrumentingAgents, identifier, &amp;loader, response, nullptr);
+}
+
+inline void InspectorInstrumentation::continueWithPolicyIgnore(Frame&amp; frame, unsigned long identifier, DocumentLoader&amp; loader, const ResourceResponse&amp; response)
+{
+    // Treat the same as didReceiveResponse.
+    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
+        didReceiveResourceResponseImpl(*instrumentingAgents, identifier, &amp;loader, response, nullptr);
+}
+
</ins><span class="cx"> inline void InspectorInstrumentation::didFinishXHRLoading(ScriptExecutionContext* context, unsigned long identifier, std::optional&lt;String&gt; decodedText, const String&amp; url, const String&amp; sendURL, unsigned sendLineNumber, unsigned sendColumnNumber)
</span><span class="cx"> {
</span><span class="cx">     if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context))
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderCrossOriginPreflightCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/CrossOriginPreflightChecker.cpp (209686 => 209687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/CrossOriginPreflightChecker.cpp        2016-12-11 23:37:11 UTC (rev 209686)
+++ trunk/Source/WebCore/loader/CrossOriginPreflightChecker.cpp        2016-12-11 23:40:15 UTC (rev 209687)
</span><span class="lines">@@ -83,8 +83,7 @@
</span><span class="cx">     // FIXME: &lt;https://webkit.org/b/164889&gt; Web Inspector: Show Preflight Request information in inspector
</span><span class="cx">     // This is only showing success preflight requests and responses but we should show network events
</span><span class="cx">     // for preflight failures and distinguish them better from non-preflight requests.
</span><del>-    auto cookie = InspectorInstrumentation::willReceiveResourceResponse(frame);
-    InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, frame-&gt;loader().documentLoader(), response, nullptr);
</del><ins>+    InspectorInstrumentation::didReceiveResourceResponse(*frame, identifier, frame-&gt;loader().documentLoader(), response, nullptr);
</ins><span class="cx">     InspectorInstrumentation::didFinishLoading(frame, frame-&gt;loader().documentLoader(), identifier, 0);
</span><span class="cx"> 
</span><span class="cx">     CrossOriginPreflightResultCache::singleton().appendEntry(loader.securityOrigin().toString(), request.url(), WTFMove(result));
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderDocumentLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (209686 => 209687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/DocumentLoader.cpp        2016-12-11 23:37:11 UTC (rev 209686)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp        2016-12-11 23:40:15 UTC (rev 209687)
</span><span class="lines">@@ -639,7 +639,7 @@
</span><span class="cx"> 
</span><span class="cx"> void DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied(unsigned long identifier, const ResourceResponse&amp; response)
</span><span class="cx"> {
</span><del>-    InspectorInstrumentation::continueAfterXFrameOptionsDenied(m_frame, *this, identifier, response);
</del><ins>+    InspectorInstrumentation::continueAfterXFrameOptionsDenied(*m_frame, identifier, *this, response);
</ins><span class="cx">     m_frame-&gt;document()-&gt;enforceSandboxFlags(SandboxOrigin);
</span><span class="cx">     if (HTMLFrameOwnerElement* ownerElement = m_frame-&gt;ownerElement())
</span><span class="cx">         ownerElement-&gt;dispatchEvent(Event::create(eventNames().loadEvent, false, false));
</span><span class="lines">@@ -798,7 +798,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (ResourceLoader* mainResourceLoader = this-&gt;mainResourceLoader())
</span><del>-            InspectorInstrumentation::continueWithPolicyDownload(m_frame, *this, mainResourceLoader-&gt;identifier(), m_response);
</del><ins>+            InspectorInstrumentation::continueWithPolicyDownload(*m_frame, mainResourceLoader-&gt;identifier(), *this, m_response);
</ins><span class="cx"> 
</span><span class="cx">         // When starting the request, we didn't know that it would result in download and not navigation. Now we know that main document URL didn't change.
</span><span class="cx">         // Download may use this knowledge for purposes unrelated to cookies, notably for setting file quarantine data.
</span><span class="lines">@@ -821,7 +821,7 @@
</span><span class="cx">     }
</span><span class="cx">     case PolicyIgnore:
</span><span class="cx">         if (ResourceLoader* mainResourceLoader = this-&gt;mainResourceLoader())
</span><del>-            InspectorInstrumentation::continueWithPolicyIgnore(m_frame, *this, mainResourceLoader-&gt;identifier(), m_response);
</del><ins>+            InspectorInstrumentation::continueWithPolicyIgnore(*m_frame, mainResourceLoader-&gt;identifier(), *this, m_response);
</ins><span class="cx">         stopLoadingForPolicyChange();
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadNotifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp (209686 => 209687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp        2016-12-11 23:37:11 UTC (rev 209686)
+++ trunk/Source/WebCore/loader/ResourceLoadNotifier.cpp        2016-12-11 23:40:15 UTC (rev 209687)
</span><span class="lines">@@ -147,8 +147,7 @@
</span><span class="cx">     Ref&lt;Frame&gt; protect(m_frame);
</span><span class="cx">     m_frame.loader().client().dispatchDidReceiveResponse(loader, identifier, r);
</span><span class="cx"> 
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(&amp;m_frame);
-    InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loader, r, resourceLoader);
</del><ins>+    InspectorInstrumentation::didReceiveResourceResponse(m_frame, identifier, loader, r, resourceLoader);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceLoadNotifier::dispatchDidReceiveData(DocumentLoader* loader, unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheApplicationCacheGroupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp (209686 => 209687)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2016-12-11 23:37:11 UTC (rev 209686)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp        2016-12-11 23:40:15 UTC (rev 209687)
</span><span class="lines">@@ -492,8 +492,7 @@
</span><span class="cx"> void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, ResourceResponse&amp;&amp; response)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_frame);
</span><del>-    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_frame);
-    InspectorInstrumentation::didReceiveResourceResponse(cookie, m_currentResourceIdentifier, m_frame-&gt;loader().documentLoader(), response, 0);
</del><ins>+    InspectorInstrumentation::didReceiveResourceResponse(*m_frame, m_currentResourceIdentifier, m_frame-&gt;loader().documentLoader(), response, nullptr);
</ins><span class="cx"> 
</span><span class="cx">     if (handle == m_manifestHandle) {
</span><span class="cx">         didReceiveManifestResponse(response);
</span></span></pre>
</div>
</div>

</body>
</html>