Title: [207801] branches/safari-602-branch/Source
Revision
207801
Author
matthew_han...@apple.com
Date
2016-10-24 20:23:10 -0700 (Mon, 24 Oct 2016)

Log Message

Merge r204472. rdar://problem/28544885

Modified Paths

Diff

Modified: branches/safari-602-branch/Source/WTF/ChangeLog (207800 => 207801)


--- branches/safari-602-branch/Source/WTF/ChangeLog	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WTF/ChangeLog	2016-10-25 03:23:10 UTC (rev 207801)
@@ -1,3 +1,20 @@
+2016-10-24  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r204472. rdar://problem/28544885
+
+    2016-08-15  Keith Rollin  <krol...@apple.com>
+
+            Rename LOG_ALWAYS
+            https://bugs.webkit.org/show_bug.cgi?id=160768
+
+            Rename LOG_ALWAYS and friends, given that the first parameter to it is
+            a boolean _expression_ that determines whether or not logging should be
+            performed.
+
+            Reviewed by Chris Dumez.
+
+            * wtf/Assertions.h:
+
 2016-10-19  Matthew Hanson  <matthew_han...@apple.com>
 
         Merge r205859. rdar://problem/28635084

Modified: branches/safari-602-branch/Source/WTF/wtf/Assertions.h (207800 => 207801)


--- branches/safari-602-branch/Source/WTF/wtf/Assertions.h	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WTF/wtf/Assertions.h	2016-10-25 03:23:10 UTC (rev 207801)
@@ -84,8 +84,8 @@
 #define LOG_DISABLED ASSERTIONS_DISABLED_DEFAULT
 #endif
 
-#ifndef LOG_ALWAYS_DISABLED
-#define LOG_ALWAYS_DISABLED !(USE(OS_LOG))
+#ifndef RELEASE_LOG_DISABLED
+#define RELEASE_LOG_DISABLED !(USE(OS_LOG))
 #endif
 
 #if COMPILER(GCC_OR_CLANG)
@@ -380,17 +380,19 @@
 #define LOG_VERBOSE(channel, ...) WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__)
 #endif
 
-/* LOG_ALWAYS */
+/* RELEASE_LOG */
 
 #define WTF_LOGGING_PREFIX "#WK: "
-#if LOG_ALWAYS_DISABLED
-#define LOG_ALWAYS(isAllowed, format, ...)       ((void)0)
-#define LOG_ALWAYS_ERROR(isAllowed, format, ...) WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, format, ##__VA_ARGS__)
+#if RELEASE_LOG_DISABLED
+#define RELEASE_LOG(format, ...)       ((void)0)
+#define RELEASE_LOG_ERROR(format, ...) WTFReportError(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, format, ##__VA_ARGS__)
 #else
 #define WTF_LOG_DEFAULT OS_LOG_DEFAULT
-#define LOG_ALWAYS(isAllowed, format, ...)       do { if (isAllowed) os_log(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__); } while (0)
-#define LOG_ALWAYS_ERROR(isAllowed, format, ...) do { if (isAllowed) os_log_error(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__); } while (0)
+#define RELEASE_LOG(format, ...)       os_log(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__)
+#define RELEASE_LOG_ERROR(format, ...) os_log_error(WTF_LOG_DEFAULT, WTF_LOGGING_PREFIX format, ##__VA_ARGS__)
 #endif
+#define RELEASE_LOG_IF(isAllowed, format, ...)       do { if (isAllowed) RELEASE_LOG(format, ##__VA_ARGS__); } while (0)
+#define RELEASE_LOG_ERROR_IF(isAllowed, format, ...) do { if (isAllowed) RELEASE_LOG_ERROR(format, ##__VA_ARGS__); } while (0)
 
 /* RELEASE_ASSERT */
 

Modified: branches/safari-602-branch/Source/WebCore/ChangeLog (207800 => 207801)


--- branches/safari-602-branch/Source/WebCore/ChangeLog	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebCore/ChangeLog	2016-10-25 03:23:10 UTC (rev 207801)
@@ -1,3 +1,29 @@
+2016-10-24  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r204472. rdar://problem/28544885
+
+    2016-08-15  Keith Rollin  <krol...@apple.com>
+
+            Rename LOG_ALWAYS
+            https://bugs.webkit.org/show_bug.cgi?id=160768
+
+            Rename LOG_ALWAYS and friends, given that the first parameter to it is
+            a boolean _expression_ that determines whether or not logging should be
+            performed.
+
+            Reviewed by Chris Dumez.
+
+            No new tests. No new functionality is added. Only some macro names
+            have been changed.
+
+            * loader/FrameLoader.cpp:
+            (WebCore::FrameLoader::prepareForLoadStart):
+            (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+            * platform/MemoryPressureHandler.cpp:
+            (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
+            * platform/graphics/cocoa/IOSurface.mm:
+            (WebCore::IOSurface::IOSurface):
+
 2016-10-20  Matthew Hanson  <matthew_han...@apple.com>
 
         Merge r207220. rdar://problem/28811939

Modified: branches/safari-602-branch/Source/WebCore/loader/FrameLoader.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebCore/loader/FrameLoader.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebCore/loader/FrameLoader.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -142,7 +142,7 @@
 #include "WKContentObservation.h"
 #endif
 
-#define FRAMELOADER_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
 
 namespace WebCore {
 
@@ -1102,7 +1102,7 @@
 
 void FrameLoader::prepareForLoadStart()
 {
-    FRAMELOADER_LOG_ALWAYS("Starting frame load, frame = %p, main = %d", &m_frame, m_frame.isMainFrame());
+    RELEASE_LOG_IF_ALLOWED("Starting frame load, frame = %p, main = %d", &m_frame, m_frame.isMainFrame());
 
     m_progressTracker->progressStarted();
     m_client.dispatchDidStartProvisionalLoad();
@@ -2309,11 +2309,11 @@
 
             AXObjectCache::AXLoadingEvent loadingEvent;
             if (!error.isNull()) {
-                FRAMELOADER_LOG_ALWAYS("Finished frame load with error, frame = %p, main = %d, isTimeout = %d, isCancellation = %d, errorCode = %d", &m_frame, m_frame.isMainFrame(), error.isTimeout(), error.isCancellation(), error.errorCode());
+                RELEASE_LOG_IF_ALLOWED("Finished frame load with error, frame = %p, main = %d, isTimeout = %d, isCancellation = %d, errorCode = %d", &m_frame, m_frame.isMainFrame(), error.isTimeout(), error.isCancellation(), error.errorCode());
                 m_client.dispatchDidFailLoad(error);
                 loadingEvent = AXObjectCache::AXLoadingFailed;
             } else {
-                FRAMELOADER_LOG_ALWAYS("Finished frame load without error, frame = %p, main = %d", &m_frame, m_frame.isMainFrame());
+                RELEASE_LOG_IF_ALLOWED("Finished frame load without error, frame = %p, main = %d", &m_frame, m_frame.isMainFrame());
 #if ENABLE(DATA_DETECTION)
                 auto* document = m_frame.document();
                 if (m_frame.settings().dataDetectorTypes() != DataDetectorTypeNone && document) {

Modified: branches/safari-602-branch/Source/WebCore/platform/MemoryPressureHandler.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebCore/platform/MemoryPressureHandler.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebCore/platform/MemoryPressureHandler.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -207,9 +207,9 @@
 
 void MemoryPressureHandler::ReliefLogger::logMemoryUsageChange()
 {
-#if !LOG_ALWAYS_DISABLED
+#if !RELEASE_LOG_DISABLED
 #define STRING_SPECIFICATION "%{public}s"
-#define MEMORYPRESSURE_LOG(...) LOG_ALWAYS(true, __VA_ARGS__)
+#define MEMORYPRESSURE_LOG(...) RELEASE_LOG(__VA_ARGS__)
 #else
 #define STRING_SPECIFICATION "%s"
 #define MEMORYPRESSURE_LOG(...) WTFLogAlways(__VA_ARGS__)

Modified: branches/safari-602-branch/Source/WebCore/platform/MemoryPressureHandler.h (207800 => 207801)


--- branches/safari-602-branch/Source/WebCore/platform/MemoryPressureHandler.h	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebCore/platform/MemoryPressureHandler.h	2016-10-25 03:23:10 UTC (rev 207801)
@@ -92,7 +92,7 @@
     public:
         explicit ReliefLogger(const char *log)
             : m_logString(log)
-#if !LOG_ALWAYS_DISABLED
+#if !RELEASE_LOG_DISABLED
             , m_initialMemory(platformMemoryUsage())
 #else
             , m_initialMemory(s_loggingEnabled ? platformMemoryUsage() : 0)
@@ -102,7 +102,7 @@
 
         ~ReliefLogger()
         {
-#if !LOG_ALWAYS_DISABLED
+#if !RELEASE_LOG_DISABLED
             logMemoryUsageChange();
 #else
             if (s_loggingEnabled)

Modified: branches/safari-602-branch/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (207800 => 207801)


--- branches/safari-602-branch/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2016-10-25 03:23:10 UTC (rev 207801)
@@ -211,7 +211,7 @@
     if (success)
         m_totalBytes = IOSurfaceGetAllocSize(m_surface.get());
     else
-        LOG_ALWAYS_ERROR(true, "Surface creation failed for size: (%d %d) and format: (%d)", size.width(), size.height(), format);
+        RELEASE_LOG_ERROR("Surface creation failed for size: (%d %d) and format: (%d)", size.width(), size.height(), format);
 }
 
 WebCore::IOSurface::IOSurface(IOSurfaceRef surface, CGColorSpaceRef colorSpace)

Modified: branches/safari-602-branch/Source/WebKit2/ChangeLog (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/ChangeLog	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/ChangeLog	2016-10-25 03:23:10 UTC (rev 207801)
@@ -1,3 +1,79 @@
+2016-10-24  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r204472. rdar://problem/28544885
+
+    2016-08-15  Keith Rollin  <krol...@apple.com>
+
+            Rename LOG_ALWAYS
+            https://bugs.webkit.org/show_bug.cgi?id=160768
+
+            Rename LOG_ALWAYS and friends, given that the first parameter to it is
+            a boolean _expression_ that determines whether or not logging should be
+            performed.
+
+            Reviewed by Chris Dumez.
+
+            * NetworkProcess/Downloads/Download.cpp:
+            (WebKit::Download::didReceiveResponse):
+            (WebKit::Download::didReceiveData):
+            (WebKit::Download::didFinish):
+            (WebKit::Download::didFail):
+            (WebKit::Download::didCancel):
+            * NetworkProcess/NetworkProcess.cpp:
+            (WebKit::NetworkProcess::prepareToSuspend):
+            (WebKit::NetworkProcess::cancelPrepareToSuspend):
+            (WebKit::NetworkProcess::processDidResume):
+            * NetworkProcess/NetworkResourceLoader.cpp:
+            (WebKit::NetworkResourceLoader::startNetworkLoad):
+            (WebKit::NetworkResourceLoader::didFinishLoading):
+            (WebKit::NetworkResourceLoader::didFailLoading):
+            (WebKit::NetworkResourceLoader::continueWillSendRequest):
+            * Platform/IPC/Connection.cpp:
+            (IPC::Connection::waitForSyncReply):
+            * Shared/ChildProcess.cpp:
+            (WebKit::didCloseOnConnectionWorkQueue):
+            * UIProcess/Cocoa/NavigationState.mm:
+            (WebKit::NavigationState::didChangeIsLoading):
+            * UIProcess/Network/NetworkProcessProxy.cpp:
+            (WebKit::NetworkProcessProxy::fetchWebsiteData):
+            (WebKit::NetworkProcessProxy::deleteWebsiteData):
+            (WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
+            (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
+            * UIProcess/ProcessThrottler.cpp:
+            (WebKit::ProcessThrottler::updateAssertionNow):
+            (WebKit::ProcessThrottler::updateAssertion):
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::WebPageProxy::updateActivityToken):
+            * UIProcess/WebProcessProxy.cpp:
+            (WebKit::WebProcessProxy::fetchWebsiteData):
+            (WebKit::WebProcessProxy::deleteWebsiteData):
+            (WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
+            (WebKit::WebProcessProxy::didSetAssertionState):
+            (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
+            * UIProcess/ios/ProcessAssertionIOS.mm:
+            (-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
+            (WebKit::ProcessAssertion::ProcessAssertion):
+            * WebProcess/Network/WebLoaderStrategy.cpp:
+            (WebKit::WebLoaderStrategy::scheduleLoad):
+            * WebProcess/Network/WebResourceLoader.cpp:
+            (WebKit::WebResourceLoader::willSendRequest):
+            (WebKit::WebResourceLoader::didReceiveResponse):
+            (WebKit::WebResourceLoader::didReceiveData):
+            (WebKit::WebResourceLoader::didFinishResourceLoad):
+            (WebKit::WebResourceLoader::didFailResourceLoad):
+            (WebKit::WebResourceLoader::didReceiveResource):
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::layerVolatilityTimerFired):
+            (WebKit::WebPage::markLayersVolatile):
+            (WebKit::WebPage::cancelMarkLayersVolatile):
+            * WebProcess/WebProcess.cpp:
+            (WebKit::WebProcess::actualPrepareToSuspend):
+            (WebKit::WebProcess::processWillSuspendImminently):
+            (WebKit::WebProcess::prepareToSuspend):
+            (WebKit::WebProcess::cancelPrepareToSuspend):
+            (WebKit::WebProcess::markAllLayersVolatile):
+            (WebKit::WebProcess::processDidResume):
+
 2016-10-20  Matthew Hanson  <matthew_han...@apple.com>
 
         Merge r206771. rdar://problem/28811939

Modified: branches/safari-602-branch/Source/WebKit2/NetworkProcess/Downloads/Download.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/NetworkProcess/Downloads/Download.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/NetworkProcess/Downloads/Download.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -41,8 +41,8 @@
 
 using namespace WebCore;
 
-#define DOWNLOAD_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define DOWNLOAD_LOG_ALWAYS_ERROR(...) LOG_ALWAYS_ERROR(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
 
 namespace WebKit {
 
@@ -90,7 +90,7 @@
 
 void Download::didReceiveResponse(const ResourceResponse& response)
 {
-    DOWNLOAD_LOG_ALWAYS("Download task (%llu) created", downloadID().downloadID());
+    RELEASE_LOG_IF_ALLOWED("Download task (%llu) created", downloadID().downloadID());
 
     send(Messages::DownloadProxy::DidReceiveResponse(response));
 }
@@ -98,7 +98,7 @@
 void Download::didReceiveData(uint64_t length)
 {
     if (!m_hasReceivedData) {
-        DOWNLOAD_LOG_ALWAYS("Download task (%llu) started receiving data", downloadID().downloadID());
+        RELEASE_LOG_IF_ALLOWED("Download task (%llu) started receiving data", downloadID().downloadID());
         m_hasReceivedData = true;
     }
 
@@ -137,7 +137,7 @@
 
 void Download::didFinish()
 {
-    DOWNLOAD_LOG_ALWAYS("Download task (%llu) finished", downloadID().downloadID());
+    RELEASE_LOG_IF_ALLOWED("Download task (%llu) finished", downloadID().downloadID());
 
     platformDidFinish();
 
@@ -153,7 +153,7 @@
 
 void Download::didFail(const ResourceError& error, const IPC::DataReference& resumeData)
 {
-    DOWNLOAD_LOG_ALWAYS("Download task (%llu) failed, isTimeout = %d, isCancellation = %d, errCode = %d",
+    RELEASE_LOG_IF_ALLOWED("Download task (%llu) failed, isTimeout = %d, isCancellation = %d, errCode = %d",
         downloadID().downloadID(), error.isTimeout(), error.isCancellation(), error.errorCode());
 
     send(Messages::DownloadProxy::DidFail(error, resumeData));
@@ -167,7 +167,7 @@
 
 void Download::didCancel(const IPC::DataReference& resumeData)
 {
-    DOWNLOAD_LOG_ALWAYS("Download task (%llu) canceled", downloadID().downloadID());
+    RELEASE_LOG_IF_ALLOWED("Download task (%llu) canceled", downloadID().downloadID());
 
     send(Messages::DownloadProxy::DidCancel(resumeData));
 

Modified: branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkProcess.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkProcess.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -599,10 +599,10 @@
 
 void NetworkProcess::prepareToSuspend()
 {
-    LOG_ALWAYS(true, "%p - NetworkProcess::prepareToSuspend()", this);
+    RELEASE_LOG("%p - NetworkProcess::prepareToSuspend()", this);
     lowMemoryHandler(Critical::Yes);
 
-    LOG_ALWAYS(true, "%p - NetworkProcess::prepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
+    RELEASE_LOG("%p - NetworkProcess::prepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
     parentProcessConnection()->send(Messages::NetworkProcessProxy::ProcessReadyToSuspend(), 0);
 }
 
@@ -612,12 +612,12 @@
     // we do not because prepareToSuspend() already replied with a NetworkProcessProxy::ProcessReadyToSuspend
     // message. And NetworkProcessProxy expects to receive either a NetworkProcessProxy::ProcessReadyToSuspend-
     // or NetworkProcessProxy::DidCancelProcessSuspension- message, but not both.
-    LOG_ALWAYS(true, "%p - NetworkProcess::cancelPrepareToSuspend()", this);
+    RELEASE_LOG("%p - NetworkProcess::cancelPrepareToSuspend()", this);
 }
 
 void NetworkProcess::processDidResume()
 {
-    LOG_ALWAYS(true, "%p - NetworkProcess::processDidResume()", this);
+    RELEASE_LOG("%p - NetworkProcess::processDidResume()", this);
 }
 
 void NetworkProcess::prefetchDNS(const String& hostname)

Modified: branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -49,8 +49,8 @@
 
 using namespace WebCore;
 
-#define NETWORKRESOURCELOADER_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define NETWORKRESOURCELOADER_LOG_ALWAYS_ERROR(...) LOG_ALWAYS_ERROR(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
 
 namespace WebKit {
 
@@ -206,7 +206,7 @@
         m_bufferedDataForCache = SharedBuffer::create();
 #endif
 
-    NETWORKRESOURCELOADER_LOG_ALWAYS("Starting network resource load: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, m_parameters.webPageID, m_parameters.webFrameID, isMainResource(), isSynchronous());
+    RELEASE_LOG_IF_ALLOWED("Starting network resource load: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, m_parameters.webPageID, m_parameters.webFrameID, isMainResource(), isSynchronous());
 
     NetworkLoadParameters parameters = m_parameters;
     parameters.defersLoading = m_defersLoading;
@@ -290,7 +290,7 @@
 
 auto NetworkResourceLoader::didReceiveResponse(ResourceResponse&& receivedResponse) -> ShouldContinueDidReceiveResponse
 {
-    NETWORKRESOURCELOADER_LOG_ALWAYS("Received network resource response: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d, httpStatusCode = %d", this, m_parameters.webPageID, m_parameters.webFrameID, isMainResource(), isSynchronous(), receivedResponse.httpStatusCode());
+    RELEASE_LOG_IF_ALLOWED("Received network resource response: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d, httpStatusCode = %d", this, m_parameters.webPageID, m_parameters.webFrameID, isMainResource(), isSynchronous(), receivedResponse.httpStatusCode());
 
     m_response = WTFMove(receivedResponse);
 
@@ -322,9 +322,9 @@
         if (isSynchronous())
             m_synchronousLoadData->response = m_response;
         else {
-            NETWORKRESOURCELOADER_LOG_ALWAYS("Sending didReceiveResponse message to the WebContent process: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
+            RELEASE_LOG_IF_ALLOWED("Sending didReceiveResponse message to the WebContent process: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
             if (!sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponse(m_response, shouldWaitContinueDidReceiveResponse))) {
-                NETWORKRESOURCELOADER_LOG_ALWAYS_ERROR("Failed to send the didReceiveResponse IPC message to the WebContent process: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
+                RELEASE_LOG_ERROR_IF_ALLOWED("Failed to send the didReceiveResponse IPC message to the WebContent process: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
                 return ShouldContinueDidReceiveResponse::No;
             }
         }
@@ -337,11 +337,11 @@
 #endif
 
     if (shouldContinueDidReceiveResponse) {
-        NETWORKRESOURCELOADER_LOG_ALWAYS("Should wait for message from WebContent process before continuing resource load: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
+        RELEASE_LOG_IF_ALLOWED("Should wait for message from WebContent process before continuing resource load: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
         return ShouldContinueDidReceiveResponse::Yes;
     }
 
-    NETWORKRESOURCELOADER_LOG_ALWAYS("Should not wait for message from WebContent process before continuing resource load: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
+    RELEASE_LOG_IF_ALLOWED("Should not wait for message from WebContent process before continuing resource load: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
     return ShouldContinueDidReceiveResponse::No;
 }
 
@@ -374,7 +374,7 @@
 
 void NetworkResourceLoader::didFinishLoading(double finishTime)
 {
-    NETWORKRESOURCELOADER_LOG_ALWAYS("Finished loading network resource: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
+    RELEASE_LOG_IF_ALLOWED("Finished loading network resource: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
 
 #if ENABLE(NETWORK_CACHE)
     if (m_cacheEntryForValidation) {
@@ -407,7 +407,7 @@
 
 void NetworkResourceLoader::didFailLoading(const ResourceError& error)
 {
-    NETWORKRESOURCELOADER_LOG_ALWAYS("Failed loading network resource: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d, isTimeout = %d, isCancellation = %d, errCode = %d", this, m_parameters.webPageID, m_parameters.webFrameID, isMainResource(), isSynchronous(), error.isTimeout(), error.isCancellation(), error.errorCode());
+    RELEASE_LOG_IF_ALLOWED("Failed loading network resource: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d, isTimeout = %d, isCancellation = %d, errCode = %d", this, m_parameters.webPageID, m_parameters.webFrameID, isMainResource(), isSynchronous(), error.isTimeout(), error.isCancellation(), error.errorCode());
 
     ASSERT(!error.isNull());
 
@@ -453,7 +453,7 @@
 
 void NetworkResourceLoader::continueWillSendRequest(ResourceRequest&& newRequest)
 {
-    NETWORKRESOURCELOADER_LOG_ALWAYS("Following redirect of network resource: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
+    RELEASE_LOG_IF_ALLOWED("Following redirect of network resource: loader = %p, pageID = %llu, frameID = %llu, isMainResource = %d, isSynchronous = %d", this, static_cast<unsigned long long>(m_parameters.webPageID), static_cast<unsigned long long>(m_parameters.webFrameID), isMainResource(), isSynchronous());
 
 #if ENABLE(NETWORK_CACHE)
     if (m_isWaitingContinueWillSendRequestForCachedRedirect) {

Modified: branches/safari-602-branch/Source/WebKit2/Platform/IPC/Connection.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/Platform/IPC/Connection.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/Platform/IPC/Connection.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -34,8 +34,6 @@
 #include <wtf/text/WTFString.h>
 #include <wtf/threads/BinarySemaphore.h>
 
-#define CONNECTION_LOG_ALWAYS_ERROR(...) LOG_ALWAYS_ERROR(true, __VA_ARGS__)
-
 namespace IPC {
 
 struct WaitForMessageState {
@@ -585,7 +583,7 @@
         // If that happens, we need to stop waiting, or we'll hang since we won't get
         // any more incoming messages.
         if (!isValid()) {
-            CONNECTION_LOG_ALWAYS_ERROR("Connection::waitForSyncReply: Connection no longer valid, id = %" PRIu64, syncRequestID);
+            RELEASE_LOG_ERROR("Connection::waitForSyncReply: Connection no longer valid, id = %" PRIu64, syncRequestID);
             didReceiveSyncReply(syncSendFlags);
             return nullptr;
         }
@@ -596,7 +594,7 @@
         timedOut = !SyncMessageState::singleton().wait(absoluteTime);
     }
 
-    CONNECTION_LOG_ALWAYS_ERROR("Connection::waitForSyncReply: Timed-out while waiting for reply, id = %" PRIu64, syncRequestID);
+    RELEASE_LOG_ERROR("Connection::waitForSyncReply: Timed-out while waiting for reply, id = %" PRIu64, syncRequestID);
     didReceiveSyncReply(syncSendFlags);
 
     return nullptr;

Modified: branches/safari-602-branch/Source/WebKit2/Shared/ChildProcess.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/Shared/ChildProcess.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/Shared/ChildProcess.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -29,8 +29,6 @@
 #include "SandboxInitializationParameters.h"
 #include <unistd.h>
 
-#define CHILDPROCESS_LOG_ALWAYS_ERROR(...) LOG_ALWAYS_ERROR(true, __VA_ARGS__)
-
 namespace WebKit {
 
 ChildProcess::ChildProcess()
@@ -55,7 +53,7 @@
         // We use _exit here since the watchdog callback is called from another thread and we don't want
         // global destructors or atexit handlers to be called from this thread while the main thread is busy
         // doing its thing.
-        CHILDPROCESS_LOG_ALWAYS_ERROR("Exiting process early due to unacknowledged closed-connection");
+        RELEASE_LOG_ERROR("Exiting process early due to unacknowledged closed-connection");
         _exit(EXIT_FAILURE);
     });
 }

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2016-10-25 03:23:10 UTC (rev 207801)
@@ -823,10 +823,10 @@
 {
 #if PLATFORM(IOS)
     if (m_webView->_page->pageLoadState().isLoading()) {
-        LOG_ALWAYS(m_webView->_page->isAlwaysOnLoggingAllowed(), "UIProcess is taking a background assertion because a page load started");
+        RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), "UIProcess is taking a background assertion because a page load started");
         m_activityToken = m_webView->_page->process().throttler().backgroundActivityToken();
     } else {
-        LOG_ALWAYS(m_webView->_page->isAlwaysOnLoggingAllowed(), "UIProcess is releasing a background assertion because a page load completed");
+        RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), "UIProcess is releasing a background assertion because a page load completed");
         m_activityToken = nullptr;
     }
 #endif

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -126,11 +126,11 @@
 
     uint64_t callbackID = generateCallbackID();
     auto token = throttler().backgroundActivityToken();
-    LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is fetching Website data", this);
+    RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is fetching Website data", this);
 
     m_pendingFetchWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID](WebsiteData websiteData) {
         completionHandler(WTFMove(websiteData));
-        LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done fetching Website data", this);
+        RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done fetching Website data", this);
     });
 
     send(Messages::NetworkProcess::FetchWebsiteData(sessionID, dataTypes, fetchOptions, callbackID), 0);
@@ -140,11 +140,11 @@
 {
     auto callbackID = generateCallbackID();
     auto token = throttler().backgroundActivityToken();
-    LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data", this);
+    RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data", this);
 
     m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID] {
         completionHandler();
-        LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data", this);
+        RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data", this);
     });
     send(Messages::NetworkProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0);
 }
@@ -155,11 +155,11 @@
 
     uint64_t callbackID = generateCallbackID();
     auto token = throttler().backgroundActivityToken();
-    LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data for several origins", this);
+    RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is taking a background assertion because the Network process is deleting Website data for several origins", this);
 
     m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [this, token, completionHandler, sessionID] {
         completionHandler();
-        LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data for several origins", this);
+        RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - NetworkProcessProxy is releasing a background assertion because the Network process is done deleting Website data for several origins", this);
     });
 
     Vector<SecurityOriginData> originData;
@@ -400,12 +400,12 @@
 void NetworkProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
 {
     if (!isHoldingLockedFiles) {
-        LOG_ALWAYS(true, "UIProcess is releasing a background assertion because the Network process is no longer holding locked files");
+        RELEASE_LOG("UIProcess is releasing a background assertion because the Network process is no longer holding locked files");
         m_tokenForHoldingLockedFiles = nullptr;
         return;
     }
     if (!m_tokenForHoldingLockedFiles) {
-        LOG_ALWAYS(true, "UIProcess is taking a background assertion because the Network process is holding locked files");
+        RELEASE_LOG("UIProcess is taking a background assertion because the Network process is holding locked files");
         m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken();
     }
 }

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/ProcessThrottler.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/ProcessThrottler.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/ProcessThrottler.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -57,7 +57,7 @@
     m_suspendTimer.stop();
     if (m_assertion) {
         if (m_assertion->state() != assertionState())
-            LOG_ALWAYS(true, "%p - ProcessThrottler::updateAssertionNow() updating process assertion state to %u (foregroundActivities: %lu, backgroundActivities: %lu)", this, assertionState(), m_foregroundCounter.value(), m_backgroundCounter.value());
+            RELEASE_LOG("%p - ProcessThrottler::updateAssertionNow() updating process assertion state to %u (foregroundActivities: %lu, backgroundActivities: %lu)", this, assertionState(), m_foregroundCounter.value(), m_backgroundCounter.value());
         m_assertion->setState(assertionState());
         m_process.didSetAssertionState(assertionState());
     }
@@ -70,7 +70,7 @@
     // in the background for too long.
     if (m_assertion && m_assertion->state() != AssertionState::Suspended && !m_foregroundCounter.value() && !m_backgroundCounter.value()) {
         ++m_suspendMessageCount;
-        LOG_ALWAYS(true, "%p - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC", this);
+        RELEASE_LOG("%p - ProcessThrottler::updateAssertion() sending PrepareToSuspend IPC", this);
         m_process.sendPrepareToSuspend();
         m_suspendTimer.startOneShot(processSuspensionTimeout);
         m_assertion->setState(AssertionState::Background);

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -179,7 +179,7 @@
 #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, m_process->connection())
 #define MESSAGE_CHECK_URL(url) MESSAGE_CHECK_BASE(m_process->checkURLReceivedFromWebProcess(url), m_process->connection())
 
-#define WEBPAGEPROXY_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
 
 using namespace WebCore;
 
@@ -1580,14 +1580,14 @@
 #if PLATFORM(IOS)
     if (!isViewVisible() && !m_alwaysRunsAtForegroundPriority) {
         if (m_activityToken) {
-            WEBPAGEPROXY_LOG_ALWAYS("%p - UIProcess is releasing a foreground assertion because the view is no longer visible", this);
+            RELEASE_LOG_IF_ALLOWED("%p - UIProcess is releasing a foreground assertion because the view is no longer visible", this);
             m_activityToken = nullptr;
         }
     } else if (!m_activityToken) {
         if (isViewVisible())
-            WEBPAGEPROXY_LOG_ALWAYS("%p - UIProcess is taking a foreground assertion because the view is visible", this);
+            RELEASE_LOG_IF_ALLOWED("%p - UIProcess is taking a foreground assertion because the view is visible", this);
         else
-            WEBPAGEPROXY_LOG_ALWAYS("%p - UIProcess is taking a foreground assertion even though the view is not visible because m_alwaysRunsAtForegroundPriority is true", this);
+            RELEASE_LOG_IF_ALLOWED("%p - UIProcess is taking a foreground assertion even though the view is not visible because m_alwaysRunsAtForegroundPriority is true", this);
         m_activityToken = m_process->throttler().foregroundActivityToken();
     }
 #endif

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/WebProcessProxy.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -753,11 +753,11 @@
 
     uint64_t callbackID = generateCallbackID();
     auto token = throttler().backgroundActivityToken();
-    LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this);
+    RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is fetching Website data", this);
 
     m_pendingFetchWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID](WebsiteData websiteData) {
         completionHandler(WTFMove(websiteData));
-        LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this);
+        RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done fetching Website data", this);
     });
 
     send(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes, callbackID), 0);
@@ -769,11 +769,11 @@
 
     uint64_t callbackID = generateCallbackID();
     auto token = throttler().backgroundActivityToken();
-    LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data", this);
+    RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data", this);
 
     m_pendingDeleteWebsiteDataCallbacks.add(callbackID, [this, token, completionHandler, sessionID] {
         completionHandler();
-        LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data", this);
+        RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data", this);
     });
     send(Messages::WebProcess::DeleteWebsiteData(sessionID, dataTypes, modifiedSince, callbackID), 0);
 }
@@ -784,11 +784,11 @@
 
     uint64_t callbackID = generateCallbackID();
     auto token = throttler().backgroundActivityToken();
-    LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data for several origins", this);
+    RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is taking a background assertion because the Web process is deleting Website data for several origins", this);
 
     m_pendingDeleteWebsiteDataForOriginsCallbacks.add(callbackID, [this, token, completionHandler, sessionID] {
         completionHandler();
-        LOG_ALWAYS(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data for several origins", this);
+        RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), "%p - WebProcessProxy is releasing a background assertion because the Web process is done deleting Website data for several origins", this);
     });
 
     Vector<SecurityOriginData> originData;
@@ -991,7 +991,7 @@
 
     switch (state) {
     case AssertionState::Suspended:
-        LOG_ALWAYS(true, "%p - WebProcessProxy::didSetAssertionState(Suspended) release all assertions for network process", this);
+        RELEASE_LOG("%p - WebProcessProxy::didSetAssertionState(Suspended) release all assertions for network process", this);
         m_foregroundTokenForNetworkProcess = nullptr;
         m_backgroundTokenForNetworkProcess = nullptr;
         for (auto& page : m_pageMap.values())
@@ -999,13 +999,13 @@
         break;
 
     case AssertionState::Background:
-        LOG_ALWAYS(true, "%p - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process", this);
+        RELEASE_LOG("%p - WebProcessProxy::didSetAssertionState(Background) taking background assertion for network process", this);
         m_backgroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().backgroundActivityToken();
         m_foregroundTokenForNetworkProcess = nullptr;
         break;
     
     case AssertionState::Foreground:
-        LOG_ALWAYS(true, "%p - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process", this);
+        RELEASE_LOG("%p - WebProcessProxy::didSetAssertionState(Foreground) taking foreground assertion for network process", this);
         m_foregroundTokenForNetworkProcess = processPool().ensureNetworkProcess().throttler().foregroundActivityToken();
         m_backgroundTokenForNetworkProcess = nullptr;
         for (auto& page : m_pageMap.values())
@@ -1022,12 +1022,12 @@
 void WebProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
 {
     if (!isHoldingLockedFiles) {
-        LOG_ALWAYS(true, "UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files");
+        RELEASE_LOG("UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files");
         m_tokenForHoldingLockedFiles = nullptr;
         return;
     }
     if (!m_tokenForHoldingLockedFiles) {
-        LOG_ALWAYS(true, "UIProcess is taking a background assertion because the WebContent process is holding locked files");
+        RELEASE_LOG("UIProcess is taking a background assertion because the WebContent process is holding locked files");
         m_tokenForHoldingLockedFiles = m_throttler.backgroundActivityToken();
     }
 }

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/ios/ProcessAssertionIOS.mm	2016-10-25 03:23:10 UTC (rev 207801)
@@ -105,7 +105,7 @@
 {
     if (_needsToRunInBackgroundCount && _backgroundTask == UIBackgroundTaskInvalid) {
         _backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithName:@"com.apple.WebKit.ProcessAssertion" expirationHandler:^{
-            LOG_ALWAYS_ERROR(true, "Background task expired while holding WebKit ProcessAssertion (isMainThread? %d).", RunLoop::isMain());
+            RELEASE_LOG_ERROR("Background task expired while holding WebKit ProcessAssertion (isMainThread? %d).", RunLoop::isMain());
             // The expiration handler gets called on a non-main thread when the underlying assertion could not be taken (rdar://problem/27278419).
             if (RunLoop::isMain())
                 [self _notifyClientsOfImminentSuspension];
@@ -165,7 +165,7 @@
     auto weakThis = createWeakPtr();
     BKSProcessAssertionAcquisitionHandler handler = ^(BOOL acquired) {
         if (!acquired) {
-            LOG_ALWAYS_ERROR(true, "Unable to acquire assertion for process %d", pid);
+            RELEASE_LOG_ERROR("Unable to acquire assertion for process %d", pid);
             ASSERT_NOT_REACHED();
             dispatch_async(dispatch_get_main_queue(), ^{
                 if (weakThis)

Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -57,8 +57,8 @@
 
 using namespace WebCore;
 
-#define WEBLOADERSTRATEGY_LOG_ALWAYS(...) LOG_ALWAYS(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define WEBLOADERSTRATEGY_LOG_ALWAYS_ERROR(...) LOG_ALWAYS_ERROR(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(loadParameters.sessionID.isAlwaysOnLoggingAllowed(), __VA_ARGS__)
 
 namespace WebKit {
 
@@ -203,7 +203,7 @@
     ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == DoNotAskClientForAnyCredentials);
 
     if (!WebProcess::singleton().networkConnection().connection().send(Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad(loadParameters), 0)) {
-        WEBLOADERSTRATEGY_LOG_ALWAYS_ERROR("WebLoaderStrategy::scheduleLoad: Unable to schedule resource with the NetworkProcess with priority = %d, pageID = %llu, frameID = %llu", static_cast<int>(resourceLoader.request().priority()), static_cast<unsigned long long>(loadParameters.webPageID), static_cast<unsigned long long>(loadParameters.webFrameID));
+        RELEASE_LOG_ERROR_IF_ALLOWED("WebLoaderStrategy::scheduleLoad: Unable to schedule resource with the NetworkProcess with priority = %d, pageID = %llu, frameID = %llu", static_cast<int>(resourceLoader.request().priority()), static_cast<unsigned long long>(loadParameters.webPageID), static_cast<unsigned long long>(loadParameters.webFrameID));
         // We probably failed to schedule this load with the NetworkProcess because it had crashed.
         // This load will never succeed so we will schedule it to fail asynchronously.
         scheduleInternallyFailedLoad(resourceLoader);
@@ -211,7 +211,7 @@
     }
 
     auto webResourceLoader = WebResourceLoader::create(resourceLoader);
-    WEBLOADERSTRATEGY_LOG_ALWAYS("WebLoaderStrategy::scheduleLoad: Resource will be scheduled with the NetworkProcess with priority = %d, pageID = %llu, frameID = %llu, WebResourceLoader = %p", static_cast<int>(resourceLoader.request().priority()), static_cast<unsigned long long>(loadParameters.webPageID), static_cast<unsigned long long>(loadParameters.webFrameID), webResourceLoader.ptr());
+    RELEASE_LOG_IF_ALLOWED("WebLoaderStrategy::scheduleLoad: Resource will be scheduled with the NetworkProcess with priority = %d, pageID = %llu, frameID = %llu, WebResourceLoader = %p", static_cast<int>(resourceLoader.request().priority()), static_cast<unsigned long long>(loadParameters.webPageID), static_cast<unsigned long long>(loadParameters.webFrameID), webResourceLoader.ptr());
     m_webResourceLoaders.set(identifier, WTFMove(webResourceLoader));
 }
 

Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -42,7 +42,7 @@
 
 using namespace WebCore;
 
-#define WEBRESOURCELOADER_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
 
 namespace WebKit {
 
@@ -78,7 +78,7 @@
 void WebResourceLoader::willSendRequest(ResourceRequest&& proposedRequest, ResourceResponse&& redirectResponse)
 {
     LOG(Network, "(WebProcess) WebResourceLoader::willSendRequest to '%s'", proposedRequest.url().string().latin1().data());
-    WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::willSendRequest, WebResourceLoader = %p", this);
+    RELEASE_LOG_IF_ALLOWED("WebResourceLoader::willSendRequest, WebResourceLoader = %p", this);
 
     RefPtr<WebResourceLoader> protectedThis(this);
 
@@ -101,7 +101,7 @@
 void WebResourceLoader::didReceiveResponse(const ResourceResponse& response, bool needsContinueDidReceiveResponseMessage)
 {
     LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponse for '%s'. Status %d.", m_coreLoader->url().string().latin1().data(), response.httpStatusCode());
-    WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didReceiveResponse, WebResourceLoader = %p, status = %d.", this, response.httpStatusCode());
+    RELEASE_LOG_IF_ALLOWED("WebResourceLoader::didReceiveResponse, WebResourceLoader = %p, status = %d.", this, response.httpStatusCode());
 
     Ref<WebResourceLoader> protect(*this);
 
@@ -135,7 +135,7 @@
     LOG(Network, "(WebProcess) WebResourceLoader::didReceiveData of size %lu for '%s'", data.size(), m_coreLoader->url().string().latin1().data());
 
     if (!m_hasReceivedData) {
-        WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didReceiveData, WebResourceLoader = %p, size = %lu", this, data.size());
+        RELEASE_LOG_IF_ALLOWED("WebResourceLoader::didReceiveData, WebResourceLoader = %p, size = %lu", this, data.size());
         m_hasReceivedData = true;
     }
 
@@ -151,7 +151,7 @@
 void WebResourceLoader::didFinishResourceLoad(double finishTime)
 {
     LOG(Network, "(WebProcess) WebResourceLoader::didFinishResourceLoad for '%s'", m_coreLoader->url().string().latin1().data());
-    WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didFinishResourceLoad, WebResourceLoader = %p", this);
+    RELEASE_LOG_IF_ALLOWED("WebResourceLoader::didFinishResourceLoad, WebResourceLoader = %p", this);
 
 #if USE(QUICK_LOOK)
     if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) {
@@ -165,7 +165,7 @@
 void WebResourceLoader::didFailResourceLoad(const ResourceError& error)
 {
     LOG(Network, "(WebProcess) WebResourceLoader::didFailResourceLoad for '%s'", m_coreLoader->url().string().latin1().data());
-    WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didFailResourceLoad, WebResourceLoader = %p", this);
+    RELEASE_LOG_IF_ALLOWED("WebResourceLoader::didFailResourceLoad, WebResourceLoader = %p", this);
 
 #if USE(QUICK_LOOK)
     if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle())
@@ -180,7 +180,7 @@
 void WebResourceLoader::didReceiveResource(const ShareableResource::Handle& handle, double finishTime)
 {
     LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResource for '%s'", m_coreLoader->url().string().latin1().data());
-    WEBRESOURCELOADER_LOG_ALWAYS("WebResourceLoader::didReceiveResource, WebResourceLoader = %p", this);
+    RELEASE_LOG_IF_ALLOWED("WebResourceLoader::didReceiveResource, WebResourceLoader = %p", this);
 
     RefPtr<SharedBuffer> buffer = handle.tryWrapInSharedBuffer();
 

Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -254,8 +254,8 @@
 static const std::chrono::milliseconds initialLayerVolatilityTimerInterval { 20 };
 static const std::chrono::seconds maximumLayerVolatilityTimerInterval { 2 };
 
-#define WEBPAGE_LOG_ALWAYS(...) LOG_ALWAYS(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
-#define WEBPAGE_LOG_ALWAYS_ERROR(...) LOG_ALWAYS_ERROR(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), __VA_ARGS__)
 
 class SendStopResponsivenessTimer {
 public:
@@ -2085,12 +2085,12 @@
     bool didSucceed = markLayersVolatileImmediatelyIfPossible();
     if (didSucceed || newInterval > maximumLayerVolatilityTimerInterval) {
         m_layerVolatilityTimer.stop();
-        WEBPAGE_LOG_ALWAYS("%p - WebPage - Attempted to mark surfaces as volatile, success? %d", this, didSucceed);
+        RELEASE_LOG_IF_ALLOWED("%p - WebPage - Attempted to mark surfaces as volatile, success? %d", this, didSucceed);
         callVolatilityCompletionHandlers();
         return;
     }
 
-    WEBPAGE_LOG_ALWAYS_ERROR("%p - WebPage - Failed to mark all layers as volatile, will retry in %lld ms", this, static_cast<long long>(newInterval.count()));
+    RELEASE_LOG_ERROR_IF_ALLOWED("%p - WebPage - Failed to mark all layers as volatile, will retry in %lld ms", this, static_cast<long long>(newInterval.count()));
     m_layerVolatilityTimer.startRepeating(newInterval);
 }
 
@@ -2101,7 +2101,7 @@
 
 void WebPage::markLayersVolatile(std::function<void ()> completionHandler)
 {
-    WEBPAGE_LOG_ALWAYS("%p - WebPage::markLayersVolatile()", this);
+    RELEASE_LOG_IF_ALLOWED("%p - WebPage::markLayersVolatile()", this);
 
     if (m_layerVolatilityTimer.isActive())
         m_layerVolatilityTimer.stop();
@@ -2112,22 +2112,22 @@
     bool didSucceed = markLayersVolatileImmediatelyIfPossible();
     if (didSucceed || m_isSuspendedUnderLock) {
         if (didSucceed)
-            WEBPAGE_LOG_ALWAYS("%p - WebPage - Successfully marked layers as volatile", this);
+            RELEASE_LOG_IF_ALLOWED("%p - WebPage - Successfully marked layers as volatile", this);
         else {
             // If we get suspended when locking the screen, it is expected that some IOSurfaces cannot be marked as purgeable so we do not keep retrying.
-            WEBPAGE_LOG_ALWAYS("%p - WebPage - Did what we could to mark IOSurfaces as purgeable after locking the screen", this);
+            RELEASE_LOG_IF_ALLOWED("%p - WebPage - Did what we could to mark IOSurfaces as purgeable after locking the screen", this);
         }
         callVolatilityCompletionHandlers();
         return;
     }
 
-    WEBPAGE_LOG_ALWAYS("%p - Failed to mark all layers as volatile, will retry in %lld ms", this, initialLayerVolatilityTimerInterval.count());
+    RELEASE_LOG_IF_ALLOWED("%p - Failed to mark all layers as volatile, will retry in %lld ms", this, initialLayerVolatilityTimerInterval.count());
     m_layerVolatilityTimer.startRepeating(initialLayerVolatilityTimerInterval);
 }
 
 void WebPage::cancelMarkLayersVolatile()
 {
-    WEBPAGE_LOG_ALWAYS("%p - WebPage::cancelMarkLayersVolatile()", this);
+    RELEASE_LOG_IF_ALLOWED("%p - WebPage::cancelMarkLayersVolatile()", this);
     m_layerVolatilityTimer.stop();
     m_markLayersAsVolatileCompletionHandlers.clear();
 }

Modified: branches/safari-602-branch/Source/WebKit2/WebProcess/WebProcess.cpp (207800 => 207801)


--- branches/safari-602-branch/Source/WebKit2/WebProcess/WebProcess.cpp	2016-10-25 03:23:02 UTC (rev 207800)
+++ branches/safari-602-branch/Source/WebKit2/WebProcess/WebProcess.cpp	2016-10-25 03:23:10 UTC (rev 207801)
@@ -142,8 +142,6 @@
 // This should be greater than tileRevalidationTimeout in TileController.
 static const double nonVisibleProcessCleanupDelay = 10;
 
-#define WEBPROCESS_LOG_ALWAYS(...) LOG_ALWAYS(true, __VA_ARGS__)
-
 namespace WebKit {
 
 WebProcess& WebProcess::singleton()
@@ -1242,10 +1240,10 @@
     setAllLayerTreeStatesFrozen(true);
 
     markAllLayersVolatile([this, shouldAcknowledgeWhenReadyToSuspend] {
-        WEBPROCESS_LOG_ALWAYS("%p - WebProcess::markAllLayersVolatile() Successfuly marked all layers as volatile", this);
+        RELEASE_LOG("%p - WebProcess::markAllLayersVolatile() Successfuly marked all layers as volatile", this);
 
         if (shouldAcknowledgeWhenReadyToSuspend == ShouldAcknowledgeWhenReadyToSuspend::Yes) {
-            WEBPROCESS_LOG_ALWAYS("%p - WebProcess::actualPrepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
+            RELEASE_LOG("%p - WebProcess::actualPrepareToSuspend() Sending ProcessReadyToSuspend IPC message", this);
             parentProcessConnection()->send(Messages::WebProcessProxy::ProcessReadyToSuspend(), 0);
         }
     });
@@ -1261,7 +1259,7 @@
         return;
     }
 
-    WEBPROCESS_LOG_ALWAYS("%p - WebProcess::processWillSuspendImminently()", this);
+    RELEASE_LOG("%p - WebProcess::processWillSuspendImminently()", this);
     DatabaseTracker::tracker().closeAllDatabases(CurrentQueryBehavior::Interrupt);
     actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend::No);
     handled = true;
@@ -1269,13 +1267,13 @@
 
 void WebProcess::prepareToSuspend()
 {
-    WEBPROCESS_LOG_ALWAYS("%p - WebProcess::prepareToSuspend()", this);
+    RELEASE_LOG("%p - WebProcess::prepareToSuspend()", this);
     actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend::Yes);
 }
 
 void WebProcess::cancelPrepareToSuspend()
 {
-    WEBPROCESS_LOG_ALWAYS("%p - WebProcess::cancelPrepareToSuspend()", this);
+    RELEASE_LOG("%p - WebProcess::cancelPrepareToSuspend()", this);
     setAllLayerTreeStatesFrozen(false);
 
     // If we've already finished cleaning up and sent ProcessReadyToSuspend, we
@@ -1285,13 +1283,13 @@
 
     cancelMarkAllLayersVolatile();
 
-    WEBPROCESS_LOG_ALWAYS("%p - WebProcess::cancelPrepareToSuspend() Sending DidCancelProcessSuspension IPC message", this);
+    RELEASE_LOG("%p - WebProcess::cancelPrepareToSuspend() Sending DidCancelProcessSuspension IPC message", this);
     parentProcessConnection()->send(Messages::WebProcessProxy::DidCancelProcessSuspension(), 0);
 }
 
 void WebProcess::markAllLayersVolatile(std::function<void()> completionHandler)
 {
-    WEBPROCESS_LOG_ALWAYS("%p - WebProcess::markAllLayersVolatile()", this);
+    RELEASE_LOG("%p - WebProcess::markAllLayersVolatile()", this);
     m_pagesMarkingLayersAsVolatile = m_pageMap.size();
     if (!m_pagesMarkingLayersAsVolatile) {
         completionHandler();
@@ -1324,7 +1322,7 @@
     
 void WebProcess::processDidResume()
 {
-    WEBPROCESS_LOG_ALWAYS("%p - WebProcess::processDidResume()", this);
+    RELEASE_LOG("%p - WebProcess::processDidResume()", this);
 
     cancelMarkAllLayersVolatile();
     setAllLayerTreeStatesFrozen(false);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to