Title: [269124] trunk/Source/WebCore
Revision
269124
Author
conrad_shu...@apple.com
Date
2020-10-28 14:16:49 -0700 (Wed, 28 Oct 2020)

Log Message

Remove diagnostic logging for plug-ins
https://bugs.webkit.org/show_bug.cgi?id=218304

Reviewed by Tim Horton.

There's no longer a need to pipe diagnostic logging up to clients.

* history/BackForwardCache.cpp:
(WebCore::canCacheFrame):

* loader/SubframeLoader.cpp:
(WebCore::logPluginRequest):
Remove a now-unused parameter.
(WebCore::FrameLoader::SubframeLoader::requestObject):
(WebCore::FrameLoader::SubframeLoader::createJavaAppletWidget):

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pluginLoadedKey): Deleted.
(WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey): Deleted.
(WebCore::DiagnosticLoggingKeys::pageContainsPluginKey): Deleted.
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey): Deleted.
(WebCore::DiagnosticLoggingKeys::hasPluginsKey): Deleted.

* page/DiagnosticLoggingKeys.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269123 => 269124)


--- trunk/Source/WebCore/ChangeLog	2020-10-28 21:09:12 UTC (rev 269123)
+++ trunk/Source/WebCore/ChangeLog	2020-10-28 21:16:49 UTC (rev 269124)
@@ -1,3 +1,30 @@
+2020-10-28  Conrad Shultz  <conrad_shu...@apple.com>
+
+        Remove diagnostic logging for plug-ins
+        https://bugs.webkit.org/show_bug.cgi?id=218304
+
+        Reviewed by Tim Horton.
+
+        There's no longer a need to pipe diagnostic logging up to clients.
+
+        * history/BackForwardCache.cpp:
+        (WebCore::canCacheFrame):
+
+        * loader/SubframeLoader.cpp:
+        (WebCore::logPluginRequest):
+        Remove a now-unused parameter.
+        (WebCore::FrameLoader::SubframeLoader::requestObject):
+        (WebCore::FrameLoader::SubframeLoader::createJavaAppletWidget):
+
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::pluginLoadedKey): Deleted.
+        (WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey): Deleted.
+        (WebCore::DiagnosticLoggingKeys::pageContainsPluginKey): Deleted.
+        (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey): Deleted.
+        (WebCore::DiagnosticLoggingKeys::hasPluginsKey): Deleted.
+
+        * page/DiagnosticLoggingKeys.h:
+
 2020-10-28  Jer Noble  <jer.no...@apple.com>
 
         [MSE] Handle trackId changing across Initialization Segments

Modified: trunk/Source/WebCore/history/BackForwardCache.cpp (269123 => 269124)


--- trunk/Source/WebCore/history/BackForwardCache.cpp	2020-10-28 21:09:12 UTC (rev 269123)
+++ trunk/Source/WebCore/history/BackForwardCache.cpp	2020-10-28 21:16:49 UTC (rev 269124)
@@ -137,7 +137,6 @@
     }
     if (frameLoader.subframeLoader().containsPlugins() && !frame.page()->settings().backForwardCacheSupportsPlugins()) {
         PCLOG("   -Frame contains plugins");
-        logBackForwardCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasPluginsKey());
         isCacheable = false;
     }
     if (frame.isMainFrame() && frame.document() && frame.document()->url().protocolIs("https") && documentLoader->response().cacheControlContainsNoStore()) {

Modified: trunk/Source/WebCore/loader/SubframeLoader.cpp (269123 => 269124)


--- trunk/Source/WebCore/loader/SubframeLoader.cpp	2020-10-28 21:09:12 UTC (rev 269123)
+++ trunk/Source/WebCore/loader/SubframeLoader.cpp	2020-10-28 21:16:49 UTC (rev 269124)
@@ -188,7 +188,7 @@
     return loadPlugin(ownerElement, url, explicitMIMEType, paramNames, paramValues, useFallback);
 }
 
-static void logPluginRequest(Page* page, const String& mimeType, const URL& url, bool success)
+static void logPluginRequest(Page* page, const String& mimeType, const URL& url)
 {
     if (!page)
         return;
@@ -203,16 +203,6 @@
 
     String pluginFile = page->pluginData().pluginFileForWebVisibleMimeType(newMIMEType);
     String description = !pluginFile ? newMIMEType : pluginFile;
-
-    DiagnosticLoggingClient& diagnosticLoggingClient = page->diagnosticLoggingClient();
-    diagnosticLoggingClient.logDiagnosticMessage(success ? DiagnosticLoggingKeys::pluginLoadedKey() : DiagnosticLoggingKeys::pluginLoadingFailedKey(), description, ShouldSample::No);
-
-    if (!page->hasSeenAnyPlugin())
-        diagnosticLoggingClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey(), emptyString(), ShouldSample::No);
-
-    if (!page->hasSeenPlugin(description))
-        diagnosticLoggingClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsPluginKey(), description, ShouldSample::No);
-
     page->sawPlugin(description);
 }
 
@@ -234,7 +224,7 @@
     bool useFallback;
     if (shouldUsePlugin(completedURL, mimeType, hasFallbackContent, useFallback)) {
         bool success = requestPlugin(ownerElement, completedURL, mimeType, paramNames, paramValues, useFallback);
-        logPluginRequest(document.page(), mimeType, completedURL, success);
+        logPluginRequest(document.page(), mimeType, completedURL);
         return success;
     }
 
@@ -280,7 +270,7 @@
     if (m_frame.settings().arePluginsEnabled())
         widget = m_frame.loader().client().createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
 
-    logPluginRequest(m_frame.page(), element.serviceType(), { }, widget);
+    logPluginRequest(m_frame.page(), element.serviceType(), { });
 
     if (!widget) {
         RenderEmbeddedObject* renderer = element.renderEmbeddedObject();

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (269123 => 269124)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2020-10-28 21:09:12 UTC (rev 269123)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2020-10-28 21:16:49 UTC (rev 269124)
@@ -53,16 +53,6 @@
     return "missingValidatorFields"_s;
 }
 
-String DiagnosticLoggingKeys::pluginLoadedKey()
-{
-    return "pluginLoaded"_s;
-}
-
-String DiagnosticLoggingKeys::pluginLoadingFailedKey()
-{
-    return "pluginFailedLoading"_s;
-}
-
 String DiagnosticLoggingKeys::postPageBackgroundingCPUUsageKey()
 {
     return "postPageBackgroundingCPUUsage"_s;
@@ -93,16 +83,6 @@
     return "provisionalLoad"_s;
 }
 
-String DiagnosticLoggingKeys::pageContainsPluginKey()
-{
-    return "pageContainsPlugin"_s;
-}
-
-String DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey()
-{
-    return "pageContainsAtLeastOnePlugin"_s;
-}
-
 String DiagnosticLoggingKeys::pageContainsMediaEngineKey()
 {
     return "pageContainsMediaEngine"_s;
@@ -263,11 +243,6 @@
     return "loading"_s;
 }
 
-String DiagnosticLoggingKeys::hasPluginsKey()
-{
-    return "hasPlugins"_s;
-}
-
 String DiagnosticLoggingKeys::httpsNoStoreKey()
 {
     return "httpsNoStore"_s;

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (269123 => 269124)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2020-10-28 21:09:12 UTC (rev 269123)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2020-10-28 21:16:49 UTC (rev 269124)
@@ -75,7 +75,6 @@
     WEBCORE_EXPORT static String failedLessThan20SecondsKey();
     WEBCORE_EXPORT static String failedMoreThan20SecondsKey();
     static String fontKey();
-    static String hasPluginsKey();
     static String httpsNoStoreKey();
     static String imageKey();
     static String inMemoryCacheKey();
@@ -120,14 +119,10 @@
     static String backForwardCacheFailureKey();
     static String visuallyEmptyKey();
     static String pageContainsAtLeastOneMediaEngineKey();
-    static String pageContainsAtLeastOnePluginKey();
     static String pageContainsMediaEngineKey();
-    static String pageContainsPluginKey();
     static String pageHandlesWebGLContextLossKey();
     static String pageLoadedKey();
     static String playedKey();
-    static String pluginLoadedKey();
-    static String pluginLoadingFailedKey();
     static String postPageBackgroundingCPUUsageKey();
     static String postPageBackgroundingMemoryUsageKey();
     static String postPageLoadCPUUsageKey();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to