Title: [276306] trunk/Source
Revision
276306
Author
[email protected]
Date
2021-04-20 08:47:23 -0700 (Tue, 20 Apr 2021)

Log Message

Remove UNUSED warnings based on the configuration.
https://bugs.webkit.org/show_bug.cgi?id=224787

Reviewed by Darin Adler.

Added UNUSED_VARIABLE or its variant to suppress warnings based on the configuration.

Source/WebCore:

No new tests because it just for suppression of the warnings.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal):
* page/PageConsoleClient.cpp:
(WebCore::snapshotCanvas):
* page/PerformanceLogging.cpp:
(WebCore::PerformanceLogging::didReachPointOfInterest):
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

Source/WebKit:

* NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
(WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prepareToSuspend):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestStorageSpace):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::installServiceWorker):
* WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
(WebKit::pageIDFromWebFrame):
(WebKit::frameIDFromWebFrame):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::prepareToSuspend):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (276305 => 276306)


--- trunk/Source/WebCore/ChangeLog	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebCore/ChangeLog	2021-04-20 15:47:23 UTC (rev 276306)
@@ -1,3 +1,24 @@
+2021-04-20  Basuke Suzuki  <[email protected]>
+
+        Remove UNUSED warnings based on the configuration.
+        https://bugs.webkit.org/show_bug.cgi?id=224787
+
+        Reviewed by Darin Adler.
+
+        Added UNUSED_VARIABLE or its variant to suppress warnings based on the configuration.
+
+        No new tests because it just for suppression of the warnings.
+
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::willSendRequestInternal):
+        * page/PageConsoleClient.cpp:
+        (WebCore::snapshotCanvas):
+        * page/PerformanceLogging.cpp:
+        (WebCore::PerformanceLogging::didReachPointOfInterest):
+        * platform/graphics/freetype/FontCacheFreeType.cpp:
+        (WebCore::FontCache::systemFallbackForCharacters):
+        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+
 2021-04-19  Darin Adler  <[email protected]>
 
         Refactor sorted array mapping machinery in LocaleToScriptMapping.cpp for reuse elsewhere

Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (276305 => 276306)


--- trunk/Source/WebCore/loader/SubresourceLoader.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -71,8 +71,13 @@
 #undef RELEASE_LOG_ERROR_IF_ALLOWED
 #define PAGE_ID ((frame() ? frame()->pageID().valueOr(PageIdentifier()) : PageIdentifier()).toUInt64())
 #define FRAME_ID ((frame() ? frame()->frameID().valueOr(FrameIdentifier()) : FrameIdentifier()).toUInt64())
+#if RELEASE_LOG_DISABLED
+#define RELEASE_LOG_IF_ALLOWED(fmt, ...) UNUSED_VARIABLE(this)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) UNUSED_VARIABLE(this)
+#else
 #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), ResourceLoading, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 ", frameLoader=%p, resourceID=%lu] SubresourceLoader::" fmt, this, PAGE_ID, FRAME_ID, frameLoader(), identifier(), ##__VA_ARGS__)
 #define RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), ResourceLoading, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 ", frameLoader=%p, resourceID=%lu] SubresourceLoader::" fmt, this, PAGE_ID, FRAME_ID, frameLoader(), identifier(), ##__VA_ARGS__)
+#endif
 
 namespace WebCore {
 

Modified: trunk/Source/WebCore/page/PageConsoleClient.cpp (276305 => 276306)


--- trunk/Source/WebCore/page/PageConsoleClient.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebCore/page/PageConsoleClient.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -289,6 +289,8 @@
 #if ENABLE(WEBGL)
     if (is<WebGLRenderingContextBase>(canvasRenderingContext))
         downcast<WebGLRenderingContextBase>(canvasRenderingContext).setPreventBufferClearForInspector(true);
+#else
+    UNUSED_PARAM(canvasRenderingContext);
 #endif
 
     auto result = canvasElement.toDataURL("image/png"_s);

Modified: trunk/Source/WebCore/page/PerformanceLogging.cpp (276305 => 276306)


--- trunk/Source/WebCore/page/PerformanceLogging.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebCore/page/PerformanceLogging.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -92,6 +92,7 @@
 {
 #if RELEASE_LOG_DISABLED
     UNUSED_PARAM(poi);
+    UNUSED_VARIABLE(m_page);
 #else
     // Ignore synthetic main frames used internally by SVG and web inspector.
     if (m_page.mainFrame().loader().client().isEmptyFrameLoaderClient())

Modified: trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp (276305 => 276306)


--- trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -246,6 +246,8 @@
 #ifdef FC_COLOR
         if (preferColoredFont == PreferColoredFont::Yes)
             FcPatternAddBool(pattern.get(), FC_COLOR, FcTrue);
+#else
+        UNUSED_VARIABLE(preferColoredFont);
 #endif
         if (!configurePatternForFontDescription(pattern.get(), description))
             return nullptr;

Modified: trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (276305 => 276306)


--- trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -78,8 +78,11 @@
 #endif
 
 static const int exifMarker = JPEG_APP0 + 1;
+
+#if USE(LCMS)
 static const int iccMarker = JPEG_APP0 + 2;
 static const unsigned iccHeaderSize = 14;
+#endif
 
 namespace WebCore {
 

Modified: trunk/Source/WebKit/ChangeLog (276305 => 276306)


--- trunk/Source/WebKit/ChangeLog	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/ChangeLog	2021-04-20 15:47:23 UTC (rev 276306)
@@ -1,3 +1,28 @@
+2021-04-20  Basuke Suzuki  <[email protected]>
+
+        Remove UNUSED warnings based on the configuration.
+        https://bugs.webkit.org/show_bug.cgi?id=224787
+
+        Reviewed by Darin Adler.
+
+        Added UNUSED_VARIABLE or its variant to suppress warnings based on the configuration.
+
+        * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
+        (WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::prepareToSuspend):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::requestStorageSpace):
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
+        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+        (WebKit::WebSWContextManagerConnection::installServiceWorker):
+        * WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
+        (WebKit::pageIDFromWebFrame):
+        (WebKit::frameIDFromWebFrame):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::prepareToSuspend):
+
 2021-04-20  Chris Dumez  <[email protected]>
 
         Make sure we don't exit the GPUProcess too frequently while under memory pressure

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp (276305 => 276306)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -536,7 +536,9 @@
     Vector<RegistrableDomain> batch;
     batch.reserveInitialCapacity(maxNumberOfDomainsInOneLogStatement);
     auto batchNumber = 1;
+#if !RELEASE_LOG_DISABLED
     unsigned numberOfBatches = std::ceil(domains.size() / static_cast<float>(maxNumberOfDomainsInOneLogStatement));
+#endif
 
     for (auto& domain : domains) {
         if (batch.size() == maxNumberOfDomainsInOneLogStatement) {

Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (276305 => 276306)


--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -2211,6 +2211,7 @@
 
     RefPtr<CallbackAggregator> callbackAggregator = CallbackAggregator::create([this, completionHandler = WTFMove(completionHandler)]() mutable {
         RELEASE_LOG(ProcessSuspension, "%p - NetworkProcess::prepareToSuspend() Process is ready to suspend", this);
+        UNUSED_VARIABLE(this);
         completionHandler();
     });
     

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (276305 => 276306)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -8146,6 +8146,7 @@
         this->makeStorageSpaceRequest(frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, [this, protectedThis = WTFMove(protectedThis), frameID, pageURL = WTFMove(pageURL), completionHandler = WTFMove(completionHandler), currentQuota](auto quota) mutable {
 
             RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace response for frame %" PRIu64 ", quota %" PRIu64, frameID.toUInt64(), quota);
+            UNUSED_VARIABLE(frameID);
 
             if (quota <= currentQuota && this->currentURL() == pageURL) {
                 RELEASE_LOG_IF_ALLOWED(Storage, "storage space increase denied");

Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (276305 => 276306)


--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -340,9 +340,10 @@
             loadParameters.cspResponseHeaders = contentSecurityPolicy->responseHeaders();
     }
     
+#if ENABLE(APP_BOUND_DOMAINS) || ENABLE(CONTENT_EXTENSIONS)
     auto* webFrameLoaderClient = frame ? toWebFrameLoaderClient(frame->loader().client()) : nullptr;
     auto* webFrame = webFrameLoaderClient ? &webFrameLoaderClient->webFrame() : nullptr;
-    auto* webPage = webFrame ? webFrame->page() : nullptr;
+#endif
 
 #if ENABLE(APP_BOUND_DOMAINS)
     if (webFrame)
@@ -353,7 +354,7 @@
     if (document) {
         loadParameters.mainDocumentURL = document->topDocument().url();
         // FIXME: Instead of passing userContentControllerIdentifier, the NetworkProcess should be able to get it using webPageId.
-        if (webPage)
+        if (auto* webPage = webFrame ? webFrame->page() : nullptr)
             loadParameters.userContentControllerIdentifier = webPage->userContentControllerIdentifier();
     }
 #endif

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (276305 => 276306)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -152,7 +152,9 @@
 
     pageConfiguration.loaderClientForMainFrame = makeUniqueRef<ServiceWorkerFrameLoaderClient>(m_webPageProxyID, m_pageID, FrameIdentifier::generate(), effectiveUserAgent);
 
+#if !RELEASE_LOG_DISABLED
     auto serviceWorkerIdentifier = data.serviceWorkerIdentifier;
+#endif
     auto serviceWorkerThreadProxy = ServiceWorkerThreadProxy::create(WTFMove(pageConfiguration), WTFMove(data), WTFMove(effectiveUserAgent), WebProcess::singleton().cacheStorageProvider(), m_storageBlockingPolicy);
     SWContextManager::singleton().registerServiceWorkerThreadForInstall(WTFMove(serviceWorkerThreadProxy));
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebURLSchemeTaskProxy.cpp (276305 => 276306)


--- trunk/Source/WebKit/WebProcess/WebPage/WebURLSchemeTaskProxy.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebURLSchemeTaskProxy.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -52,6 +52,7 @@
 namespace WebKit {
 using namespace WebCore;
 
+#if !RELEASE_LOG_DISABLED
 static uint64_t pageIDFromWebFrame(const RefPtr<WebFrame>& frame)
 {
     if (frame) {
@@ -67,6 +68,7 @@
         return frame->frameID().toUInt64();
     return 0;
 }
+#endif
 
 WebURLSchemeTaskProxy::WebURLSchemeTaskProxy(WebURLSchemeHandlerProxy& handler, ResourceLoader& loader, WebFrame& frame)
     : m_urlSchemeHandler(handler)

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (276305 => 276306)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-04-20 15:45:09 UTC (rev 276305)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-04-20 15:47:23 UTC (rev 276306)
@@ -218,8 +218,13 @@
 
 #undef RELEASE_LOG_IF_ALLOWED
 #define RELEASE_LOG_SESSION_ID (m_sessionID ? m_sessionID->toUInt64() : 0)
+#if RELEASE_LOG_DISABLED
+#define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) UNUSED_VARIABLE(this)
+#define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) UNUSED_VARIABLE(this)
+#else
 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__)
 #define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [sessionID=%" PRIu64 "] WebProcess::" fmt, this, RELEASE_LOG_SESSION_ID, ##__VA_ARGS__)
+#endif
 
 // This should be less than plugInAutoStartExpirationTimeThreshold in PlugInAutoStartProvider.
 static const Seconds plugInAutoStartExpirationTimeUpdateThreshold { 29 * 24 * 60 * 60 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to