Clean up NETWORK_SESSION code after r191848
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 09:16:53 +0000 (09:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Nov 2015 09:16:53 +0000 (09:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150829

Patch by Alex Christensen <achristensen@webkit.org> on 2015-11-03
Reviewed by Darin Adler.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveData):
(WebKit::NetworkResourceLoader::didCompleteWithError):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
(WebKit::NetworkSession::dataTaskForIdentifier):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkSession.h
Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm

index 20e0a2797031fc6b526862b21dad71fb3193331f..fd36033650fcf228f166693b9f4a6065776b616a 100644 (file)
@@ -1,3 +1,19 @@
+2015-11-03  Alex Christensen  <achristensen@webkit.org>
+
+        Clean up NETWORK_SESSION code after r191848
+        https://bugs.webkit.org/show_bug.cgi?id=150829
+
+        Reviewed by Darin Adler.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::didReceiveData):
+        (WebKit::NetworkResourceLoader::didCompleteWithError):
+        * NetworkProcess/NetworkSession.h:
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (WebKit::NetworkSession::NetworkSession):
+        (WebKit::NetworkSession::createDataTaskWithRequest):
+        (WebKit::NetworkSession::dataTaskForIdentifier):
+
 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix GTK+ build after r191924.
 2015-11-02  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix GTK+ build after r191924.
index 2c50973b808c8f01396e4f01c08c358e6a52074f..776d7ccd2bd73f0ce33050c720e354279a6b155a 100644 (file)
@@ -470,7 +470,8 @@ void NetworkResourceLoader::didReceiveResponse(const WebCore::ResourceResponse&
 void NetworkResourceLoader::didReceiveData(RefPtr<WebCore::SharedBuffer>&& buffer)
 {
     ASSERT(buffer);
 void NetworkResourceLoader::didReceiveData(RefPtr<WebCore::SharedBuffer>&& buffer)
 {
     ASSERT(buffer);
-    sharedDidReceiveBuffer(WTF::move(buffer), buffer->size());
+    auto size = buffer->size();
+    sharedDidReceiveBuffer(WTF::move(buffer), size);
 }
 
 void NetworkResourceLoader::didCompleteWithError(const WebCore::ResourceError& error)
 }
 
 void NetworkResourceLoader::didCompleteWithError(const WebCore::ResourceError& error)
index 4483e5bfdd7dfea1ba4854a3726c33b1f899063c..742a616a3f51b678c0addf055a2b3601d903bc8b 100644 (file)
@@ -103,7 +103,7 @@ public:
         Ephemeral
     };
 
         Ephemeral
     };
 
-    RefPtr<NetworkingDataTask> createDataTaskWithRequest(const WebCore::ResourceRequest&, NetworkSessionTaskClient&);
+    Ref<NetworkingDataTask> createDataTaskWithRequest(const WebCore::ResourceRequest&, NetworkSessionTaskClient&);
 
     static Ref<NetworkSession> singleton(); // FIXME: This shouldn't actually be a singleton.
     NetworkingDataTask* dataTaskForIdentifier(uint64_t);
 
     static Ref<NetworkSession> singleton(); // FIXME: This shouldn't actually be a singleton.
     NetworkingDataTask* dataTaskForIdentifier(uint64_t);
index b611371f2a2d0d5ac81d74c482d91abe7ef01c34..7ab14a28bce7d16fea7b7a6e830372d5a696908c 100644 (file)
@@ -186,10 +186,9 @@ NetworkSession::NetworkSession(Type type)
     m_session = [NSURLSession sessionWithConfiguration:configuration delegate:static_cast<id>(m_sessionDelegate.get()) delegateQueue:[NSOperationQueue mainQueue]];
 }
 
     m_session = [NSURLSession sessionWithConfiguration:configuration delegate:static_cast<id>(m_sessionDelegate.get()) delegateQueue:[NSOperationQueue mainQueue]];
 }
 
-RefPtr<NetworkingDataTask> NetworkSession::createDataTaskWithRequest(const WebCore::ResourceRequest& request, NetworkSessionTaskClient& client)
+Ref<NetworkingDataTask> NetworkSession::createDataTaskWithRequest(const WebCore::ResourceRequest& request, NetworkSessionTaskClient& client)
 {
 {
-    RefPtr<NetworkingDataTask> task = adoptRef(new NetworkingDataTask(*this, client, [m_session dataTaskWithRequest:request.nsURLRequest(WebCore::UpdateHTTPBody)]));
-    return task;
+    return adoptRef(*new NetworkingDataTask(*this, client, [m_session dataTaskWithRequest:request.nsURLRequest(WebCore::UpdateHTTPBody)]));
 }
 
 NetworkingDataTask* NetworkSession::dataTaskForIdentifier(uint64_t taskIdentifier)
 }
 
 NetworkingDataTask* NetworkSession::dataTaskForIdentifier(uint64_t taskIdentifier)