Title: [206123] trunk/Source/WebKit2
Revision
206123
Author
krol...@apple.com
Date
2016-09-19 15:53:12 -0700 (Mon, 19 Sep 2016)

Log Message

Reduce logging from WebResourceLoader::didReceiveData
https://bugs.webkit.org/show_bug.cgi?id=162233

Reviewed by Antti Koivisto.

Only log once even if called multiple times for a single resource.

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveData):
* WebProcess/Network/WebResourceLoader.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (206122 => 206123)


--- trunk/Source/WebKit2/ChangeLog	2016-09-19 22:33:56 UTC (rev 206122)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-19 22:53:12 UTC (rev 206123)
@@ -1,3 +1,16 @@
+2016-09-19  Keith Rollin  <krol...@apple.com>
+
+        Reduce logging from WebResourceLoader::didReceiveData
+        https://bugs.webkit.org/show_bug.cgi?id=162233
+
+        Reviewed by Antti Koivisto.
+
+        Only log once even if called multiple times for a single resource.
+
+        * WebProcess/Network/WebResourceLoader.cpp:
+        (WebKit::WebResourceLoader::didReceiveData):
+        * WebProcess/Network/WebResourceLoader.h:
+
 2016-09-19  Daniel Bates  <daba...@apple.com>
 
         Remove ENABLE(TEXT_AUTOSIZING) automatic text size adjustment code

Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (206122 => 206123)


--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2016-09-19 22:33:56 UTC (rev 206122)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2016-09-19 22:53:12 UTC (rev 206123)
@@ -133,8 +133,12 @@
 void WebResourceLoader::didReceiveData(const IPC::DataReference& data, int64_t encodedDataLength)
 {
     LOG(Network, "(WebProcess) WebResourceLoader::didReceiveData of size %lu for '%s'", data.size(), m_coreLoader->url().string().latin1().data());
-    RELEASE_LOG_IF_ALLOWED("didReceiveData: (size = %lu)", data.size());
 
+    if (!m_hasReceivedData) {
+        RELEASE_LOG_IF_ALLOWED("didReceiveData: (size = %lu)", data.size());
+        m_hasReceivedData = true;
+    }
+
 #if USE(QUICK_LOOK)
     if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) {
         if (quickLookHandle->didReceiveData(adoptCF(CFDataCreate(kCFAllocatorDefault, data.data(), data.size())).get()))

Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h (206122 => 206123)


--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h	2016-09-19 22:33:56 UTC (rev 206122)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.h	2016-09-19 22:53:12 UTC (rev 206123)
@@ -85,6 +85,7 @@
 #endif
 
     RefPtr<WebCore::ResourceLoader> m_coreLoader;
+    bool m_hasReceivedData { false };
 };
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to