Title: [209898] trunk/Source/WebKit2
Revision
209898
Author
achristen...@apple.com
Date
2016-12-15 18:25:35 -0800 (Thu, 15 Dec 2016)

Log Message

Improve NetworkSession logging
https://bugs.webkit.org/show_bug.cgi?id=165941

Reviewed by Tim Horton.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
One of the "didReceiveResponse completionHandler (cancel)" messages was wrong,
and other messages could have more useful information without being overwhelming.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (209897 => 209898)


--- trunk/Source/WebKit2/ChangeLog	2016-12-16 02:16:19 UTC (rev 209897)
+++ trunk/Source/WebKit2/ChangeLog	2016-12-16 02:25:35 UTC (rev 209898)
@@ -1,3 +1,17 @@
+2016-12-15  Alex Christensen  <achristen...@webkit.org>
+
+        Improve NetworkSession logging
+        https://bugs.webkit.org/show_bug.cgi?id=165941
+
+        Reviewed by Tim Horton.
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
+        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
+        (-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
+        One of the "didReceiveResponse completionHandler (cancel)" messages was wrong,
+        and other messages could have more useful information without being overwhelming.
+
 2016-12-15  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Sort Xcode project files

Modified: trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm (209897 => 209898)


--- trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2016-12-16 02:16:19 UTC (rev 209897)
+++ trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2016-12-16 02:25:35 UTC (rev 209898)
@@ -176,7 +176,7 @@
         auto sessionID = _session->sessionID();
         auto challengeCompletionHandler = [completionHandlerCopy, sessionID, authenticationChallenge, taskIdentifier](WebKit::AuthenticationChallengeDisposition disposition, const WebCore::Credential& credential)
         {
-            LOG(NetworkSession, "%llu didReceiveChallenge completionHandler", taskIdentifier);
+            LOG(NetworkSession, "%llu didReceiveChallenge completionHandler %d", taskIdentifier, disposition);
 #if !USE(CREDENTIAL_STORAGE_WITH_NETWORK_SESSION)
             UNUSED_PARAM(sessionID);
             UNUSED_PARAM(authenticationChallenge);
@@ -207,7 +207,7 @@
 
 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
 {
-    LOG(NetworkSession, "%llu didCompleteWithError", task.taskIdentifier);
+    LOG(NetworkSession, "%llu didCompleteWithError %@", task.taskIdentifier, error);
     auto storedCredentials = _withCredentials ? WebCore::StoredCredentials::AllowStoredCredentials : WebCore::StoredCredentials::DoNotAllowStoredCredentials;
     if (auto* networkDataTask = _session->dataTaskForIdentifier(task.taskIdentifier, storedCredentials))
         networkDataTask->didCompleteWithError(error);
@@ -253,7 +253,7 @@
         copyTimingData([dataTask _timingData], resourceResponse.networkLoadTiming());
         auto completionHandlerCopy = Block_copy(completionHandler);
         networkDataTask->didReceiveResponse(WTFMove(resourceResponse), [completionHandlerCopy, taskIdentifier](WebCore::PolicyAction policyAction) {
-            LOG(NetworkSession, "%llu didReceiveResponse completionHandler (cancel)", taskIdentifier);
+            LOG(NetworkSession, "%llu didReceiveResponse completionHandler (%d)", taskIdentifier, policyAction);
             completionHandlerCopy(toNSURLSessionResponseDisposition(policyAction));
             Block_release(completionHandlerCopy);
         });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to