<!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>[163905] 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/163905">163905</a></dd>
<dt>Author</dt> <dd>aestes@apple.com</dd>
<dt>Date</dt> <dd>2014-02-11 13:28:55 -0800 (Tue, 11 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
https://bugs.webkit.org/show_bug.cgi?id=128583

Reviewed by Anders Carlsson.

The delegate method was removed in Snow Leopard.

Source/WebCore:

* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
* platform/network/ResourceHandleClient.h:
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

Source/WebKit/mac:

* Misc/WebDownload.mm:

Source/WebKit2:

* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoaderh">trunk/Source/WebCore/loader/ResourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleClienth">trunk/Source/WebCore/platform/network/ResourceHandleClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebDownloadmm">trunk/Source/WebKit/mac/Misc/WebDownload.mm</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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebCore/ChangeLog        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -1,5 +1,20 @@
</span><span class="cx"> 2014-02-11  Andy Estes  &lt;aestes@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
+        https://bugs.webkit.org/show_bug.cgi?id=128583
+
+        Reviewed by Anders Carlsson.
+
+        The delegate method was removed in Snow Leopard.
+
+        * loader/ResourceLoader.cpp:
+        * loader/ResourceLoader.h:
+        * platform/network/ResourceHandleClient.h:
+        * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
+        * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
+
+2014-02-10  Andy Estes  &lt;aestes@apple.com&gt;
+
</ins><span class="cx">         [Content Filter] Check for NULL before calling dispatch_release()
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=128576
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -342,15 +342,6 @@
</span><span class="cx">         frameLoader()-&gt;notifier().didReceiveData(this, buffer ? buffer-&gt;data() : data, buffer ? buffer-&gt;size() : length, static_cast&lt;int&gt;(encodedDataLength));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ResourceLoader::willStopBufferingData(const char* data, unsigned length)
-{
-    if (m_options.dataBufferingPolicy == DoNotBufferData)
-        return;
-
-    ASSERT(!m_resourceData);
-    m_resourceData = ResourceBuffer::create(data, length);
-}
-
</del><span class="cx"> void ResourceLoader::didFinishLoading(double finishTime)
</span><span class="cx"> {
</span><span class="cx">     didFinishLoadingOnePart(finishTime);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.h (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.h        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebCore/loader/ResourceLoader.h        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -94,7 +94,6 @@
</span><span class="cx">     virtual void didReceiveResponse(const ResourceResponse&amp;);
</span><span class="cx">     virtual void didReceiveData(const char*, unsigned, long long encodedDataLength, DataPayloadType);
</span><span class="cx">     virtual void didReceiveBuffer(PassRefPtr&lt;SharedBuffer&gt;, long long encodedDataLength, DataPayloadType);
</span><del>-    void willStopBufferingData(const char*, unsigned);
</del><span class="cx">     virtual void didFinishLoading(double finishTime);
</span><span class="cx">     virtual void didFail(const ResourceError&amp;);
</span><span class="cx"> #if USE(NETWORK_CFDATA_ARRAY_CALLBACK)
</span><span class="lines">@@ -120,9 +119,6 @@
</span><span class="cx">     virtual void didFail(ResourceHandle*, const ResourceError&amp;) override;
</span><span class="cx">     virtual void wasBlocked(ResourceHandle*) override;
</span><span class="cx">     virtual void cannotShowURL(ResourceHandle*) override;
</span><del>-#if PLATFORM(COCOA) &amp;&amp; !USE(CFNETWORK)
-    virtual void willStopBufferingData(ResourceHandle*, const char* data, unsigned length) override { willStopBufferingData(data, length); }
-#endif
</del><span class="cx">     virtual bool shouldUseCredentialStorage(ResourceHandle*) override { return shouldUseCredentialStorage(); }
</span><span class="cx">     virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&amp; challenge) override { didReceiveAuthenticationChallenge(challenge); } 
</span><span class="cx">     virtual void didCancelAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge&amp; challenge) override { didCancelAuthenticationChallenge(challenge); } 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandleClient.h (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandleClient.h        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebCore/platform/network/ResourceHandleClient.h        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -122,7 +122,6 @@
</span><span class="cx"> 
</span><span class="cx"> #elif PLATFORM(COCOA)
</span><span class="cx">         virtual NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse *response) { return response; }
</span><del>-        virtual void willStopBufferingData(ResourceHandle*, const char*, unsigned) { }
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -224,20 +224,6 @@
</span><span class="cx">     m_handle-&gt;client()-&gt;didReceiveBuffer(m_handle, SharedBuffer::wrapNSData(data), -1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)connection:(NSURLConnection *)connection willStopBufferingData:(NSData *)data
-{
-    UNUSED_PARAM(connection);
-
-    LOG(Network, &quot;Handle %p delegate connection:%p willStopBufferingData:%p&quot;, m_handle, connection, data);
-
-    if (!m_handle || !m_handle-&gt;client())
-        return;
-    // FIXME: If we get a resource with more than 2B bytes, this code won't do the right thing.
-    // However, with today's computers and networking speeds, this won't happen in practice.
-    // Could be an issue with a giant local file.
-    m_handle-&gt;client()-&gt;willStopBufferingData(m_handle, (const char*)[data bytes], static_cast&lt;unsigned&gt;([data length]));
-}
-
</del><span class="cx"> - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(connection);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsOperationQueueDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -290,23 +290,6 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)connection:(NSURLConnection *)connection willStopBufferingData:(NSData *)data
-{
-    ASSERT(!isMainThread());
-    UNUSED_PARAM(connection);
-
-    LOG(Network, &quot;Handle %p delegate connection:%p willStopBufferingData:%p&quot;, m_handle, connection, data);
-
-    dispatch_async(dispatch_get_main_queue(), ^{
-        if (!m_handle || !m_handle-&gt;client())
-            return;
-        // FIXME: If we get a resource with more than 2B bytes, this code won't do the right thing.
-        // However, with today's computers and networking speeds, this won't happen in practice.
-        // Could be an issue with a giant local file.
-        m_handle-&gt;client()-&gt;willStopBufferingData(m_handle, (const char*)[data bytes], static_cast&lt;unsigned&gt;([data length]));
-    });
-}
-
</del><span class="cx"> - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-02-11  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
+        https://bugs.webkit.org/show_bug.cgi?id=128583
+
+        Reviewed by Anders Carlsson.
+
+        The delegate method was removed in Snow Leopard.
+
+        * Misc/WebDownload.mm:
+
</ins><span class="cx"> 2014-02-11  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         iOS build fix.
</span></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebDownloadmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebDownload.mm (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebDownload.mm        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebKit/mac/Misc/WebDownload.mm        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -262,13 +262,4 @@
</span><span class="cx">     return [super _initWithRequest:request delegate:_webInternal directory:directory];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)connection:(NSURLConnection *)connection willStopBufferingData:(NSData *)data
-{
-    // NSURLConnection calls this method even if it is not implemented.
-    // This happens because NSURLConnection caches the results of respondsToSelector.
-    // Those results become invalid when the delegate of NSURLConnectionDelegateProxy is changed.
-    // This is a workaround since this problem needs to be fixed in NSURLConnectionDelegateProxy.
-    // &lt;rdar://problem/3913270&gt; NSURLConnection calls unimplemented delegate method in WebDownload
-}
-
</del><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-02-11  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate
+        https://bugs.webkit.org/show_bug.cgi?id=128583
+
+        Reviewed by Anders Carlsson.
+
+        The delegate method was removed in Snow Leopard.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        * NetworkProcess/NetworkResourceLoader.h:
+
</ins><span class="cx"> 2014-02-11  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IndexedDB tests on some bots are flakey (timeouts)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -405,13 +405,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
-void NetworkResourceLoader::willStopBufferingData(ResourceHandle*, const char*, unsigned)
-{
-    notImplemented();
-}
-#endif // PLATFORM(MAC)
-
</del><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(NETWORK_PROCESS)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (163904 => 163905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-02-11 21:28:51 UTC (rev 163904)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-02-11 21:28:55 UTC (rev 163905)
</span><span class="lines">@@ -108,7 +108,6 @@
</span><span class="cx">     static size_t fileBackedResourceMinimumSize();
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx">     virtual void willCacheResponseAsync(WebCore::ResourceHandle*, NSCachedURLResponse *) override;
</span><del>-    virtual void willStopBufferingData(WebCore::ResourceHandle*, const char*, unsigned) override;
</del><span class="cx"> #endif
</span><span class="cx"> #endif // PLATFORM(MAC)
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>