Changeset 163905 in webkit
- Timestamp:
- Feb 11, 2014 1:28:55 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r163904 r163905 1 1 2014-02-11 Andy Estes <aestes@apple.com> 2 3 [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate 4 https://bugs.webkit.org/show_bug.cgi?id=128583 5 6 Reviewed by Anders Carlsson. 7 8 The delegate method was removed in Snow Leopard. 9 10 * loader/ResourceLoader.cpp: 11 * loader/ResourceLoader.h: 12 * platform/network/ResourceHandleClient.h: 13 * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: 14 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: 15 16 2014-02-10 Andy Estes <aestes@apple.com> 2 17 3 18 [Content Filter] Check for NULL before calling dispatch_release() -
trunk/Source/WebCore/loader/ResourceLoader.cpp
r163725 r163905 343 343 } 344 344 345 void ResourceLoader::willStopBufferingData(const char* data, unsigned length)346 {347 if (m_options.dataBufferingPolicy == DoNotBufferData)348 return;349 350 ASSERT(!m_resourceData);351 m_resourceData = ResourceBuffer::create(data, length);352 }353 354 345 void ResourceLoader::didFinishLoading(double finishTime) 355 346 { -
trunk/Source/WebCore/loader/ResourceLoader.h
r163725 r163905 95 95 virtual void didReceiveData(const char*, unsigned, long long encodedDataLength, DataPayloadType); 96 96 virtual void didReceiveBuffer(PassRefPtr<SharedBuffer>, long long encodedDataLength, DataPayloadType); 97 void willStopBufferingData(const char*, unsigned);98 97 virtual void didFinishLoading(double finishTime); 99 98 virtual void didFail(const ResourceError&); … … 121 120 virtual void wasBlocked(ResourceHandle*) override; 122 121 virtual void cannotShowURL(ResourceHandle*) override; 123 #if PLATFORM(COCOA) && !USE(CFNETWORK)124 virtual void willStopBufferingData(ResourceHandle*, const char* data, unsigned length) override { willStopBufferingData(data, length); }125 #endif126 122 virtual bool shouldUseCredentialStorage(ResourceHandle*) override { return shouldUseCredentialStorage(); } 127 123 virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge& challenge) override { didReceiveAuthenticationChallenge(challenge); } -
trunk/Source/WebCore/platform/network/ResourceHandleClient.h
r163657 r163905 123 123 #elif PLATFORM(COCOA) 124 124 virtual NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse *response) { return response; } 125 virtual void willStopBufferingData(ResourceHandle*, const char*, unsigned) { }126 125 #endif 127 126 -
trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm
r161589 r163905 225 225 } 226 226 227 - (void)connection:(NSURLConnection *)connection willStopBufferingData:(NSData *)data228 {229 UNUSED_PARAM(connection);230 231 LOG(Network, "Handle %p delegate connection:%p willStopBufferingData:%p", m_handle, connection, data);232 233 if (!m_handle || !m_handle->client())234 return;235 // FIXME: If we get a resource with more than 2B bytes, this code won't do the right thing.236 // However, with today's computers and networking speeds, this won't happen in practice.237 // Could be an issue with a giant local file.238 m_handle->client()->willStopBufferingData(m_handle, (const char*)[data bytes], static_cast<unsigned>([data length]));239 }240 241 227 - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite 242 228 { -
trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
r161338 r163905 291 291 } 292 292 293 - (void)connection:(NSURLConnection *)connection willStopBufferingData:(NSData *)data294 {295 ASSERT(!isMainThread());296 UNUSED_PARAM(connection);297 298 LOG(Network, "Handle %p delegate connection:%p willStopBufferingData:%p", m_handle, connection, data);299 300 dispatch_async(dispatch_get_main_queue(), ^{301 if (!m_handle || !m_handle->client())302 return;303 // FIXME: If we get a resource with more than 2B bytes, this code won't do the right thing.304 // However, with today's computers and networking speeds, this won't happen in practice.305 // Could be an issue with a giant local file.306 m_handle->client()->willStopBufferingData(m_handle, (const char*)[data bytes], static_cast<unsigned>([data length]));307 });308 }309 310 293 - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite 311 294 { -
trunk/Source/WebKit/mac/ChangeLog
r163883 r163905 1 2014-02-11 Andy Estes <aestes@apple.com> 2 3 [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate 4 https://bugs.webkit.org/show_bug.cgi?id=128583 5 6 Reviewed by Anders Carlsson. 7 8 The delegate method was removed in Snow Leopard. 9 10 * Misc/WebDownload.mm: 11 1 12 2014-02-11 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/Source/WebKit/mac/Misc/WebDownload.mm
r161185 r163905 263 263 } 264 264 265 - (void)connection:(NSURLConnection *)connection willStopBufferingData:(NSData *)data 266 { 267 // NSURLConnection calls this method even if it is not implemented. 268 // This happens because NSURLConnection caches the results of respondsToSelector. 269 // Those results become invalid when the delegate of NSURLConnectionDelegateProxy is changed. 270 // This is a workaround since this problem needs to be fixed in NSURLConnectionDelegateProxy. 271 // <rdar://problem/3913270> NSURLConnection calls unimplemented delegate method in WebDownload 272 } 273 274 @end 265 @end -
trunk/Source/WebKit2/ChangeLog
r163892 r163905 1 2014-02-11 Andy Estes <aestes@apple.com> 2 3 [Mac] connection:willStopBufferingData: no longer exists in NSURLConnectionDelegate 4 https://bugs.webkit.org/show_bug.cgi?id=128583 5 6 Reviewed by Anders Carlsson. 7 8 The delegate method was removed in Snow Leopard. 9 10 * NetworkProcess/NetworkResourceLoader.cpp: 11 * NetworkProcess/NetworkResourceLoader.h: 12 1 13 2014-02-11 Brady Eidson <beidson@apple.com> 2 14 -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
r162568 r163905 406 406 #endif 407 407 408 #if PLATFORM(MAC) && !PLATFORM(IOS)409 void NetworkResourceLoader::willStopBufferingData(ResourceHandle*, const char*, unsigned)410 {411 notImplemented();412 }413 #endif // PLATFORM(MAC)414 415 408 } // namespace WebKit 416 409 -
trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
r162568 r163905 109 109 #if !PLATFORM(IOS) 110 110 virtual void willCacheResponseAsync(WebCore::ResourceHandle*, NSCachedURLResponse *) override; 111 virtual void willStopBufferingData(WebCore::ResourceHandle*, const char*, unsigned) override;112 111 #endif 113 112 #endif // PLATFORM(MAC)
Note: See TracChangeset
for help on using the changeset viewer.