Clean up NETWORK_SESSION code after r191848
[WebKit-https.git] / Source / WebKit2 / NetworkProcess / cocoa / NetworkSessionCocoa.mm
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)