Title: [153848] trunk/Source/WebKit2
Revision
153848
Author
[email protected]
Date
2013-08-08 14:33:37 -0700 (Thu, 08 Aug 2013)

Log Message

Add logging to the primary plugin detection
https://bugs.webkit.org/show_bug.cgi?id=119594

Reviewed by Tim Horton.

Add some simple logging to our primary plug-in detection.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (153847 => 153848)


--- trunk/Source/WebKit2/ChangeLog	2013-08-08 21:19:27 UTC (rev 153847)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-08 21:33:37 UTC (rev 153848)
@@ -1,3 +1,15 @@
+2013-08-08  Dean Jackson  <[email protected]>
+
+        Add logging to the primary plugin detection
+        https://bugs.webkit.org/show_bug.cgi?id=119594
+
+        Reviewed by Tim Horton.
+
+        Add some simple logging to our primary plug-in detection.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
+
 2013-08-08  Alexey Proskuryakov  <[email protected]>
 
         WKBundleFrameCopyProvisionalURL crashes when there is no provisional loader

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (153847 => 153848)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-08-08 21:19:27 UTC (rev 153847)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-08-08 21:33:37 UTC (rev 153848)
@@ -37,6 +37,7 @@
 #include "InjectedBundleBackForwardList.h"
 #include "InjectedBundleUserMessageCoders.h"
 #include "LayerTreeHost.h"
+#include "Logging.h"
 #include "NetscapePlugin.h"
 #include "NotificationPermissionRequestManager.h"
 #include "PageBanner.h"
@@ -3068,6 +3069,7 @@
 
     m_pluginViews.add(pluginView);
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
+    LOG(Plugins, "Primary Plug-In Detection: triggering detection from addPluginView.");
     m_determinePrimarySnapshottedPlugInTimer.startOneShot(0);
 #endif
 }
@@ -4022,6 +4024,7 @@
         return;
 
     m_readyToFindPrimarySnapshottedPlugin = true;
+    LOG(Plugins, "Primary Plug-In Detection: triggering detection from didFinishLoad (marking as ready to detect).");
     m_determinePrimarySnapshottedPlugInTimer.startOneShot(0);
 #else
     UNUSED_PARAM(frame);
@@ -4052,14 +4055,22 @@
     if (!m_page->settings()->plugInSnapshottingEnabled())
         return;
 
-    if (!m_readyToFindPrimarySnapshottedPlugin)
+    LOG(Plugins, "Primary Plug-In Detection: began.");
+
+    if (!m_readyToFindPrimarySnapshottedPlugin) {
+        LOG(Plugins, "Primary Plug-In Detection: exiting - not ready to find plugins.");
         return;
+    }
 
-    if (m_pluginViews.isEmpty())
+    if (m_pluginViews.isEmpty()) {
+        LOG(Plugins, "Primary Plug-In Detection: exiting - no plugin views.");
         return;
+    }
 
-    if (m_didFindPrimarySnapshottedPlugin)
+    if (m_didFindPrimarySnapshottedPlugin) {
+        LOG(Plugins, "Primary Plug-In Detection: exiting - we've already found a primary plug-in.");
         return;
+    }
 
     RenderView* renderView = corePage()->mainFrame()->view()->renderView();
 
@@ -4114,9 +4125,12 @@
         }
     }
 
-    if (!candidatePlugIn)
+    if (!candidatePlugIn) {
+        LOG(Plugins, "Primary Plug-In Detection: fail - did not find a candidate plug-in.");
         return;
+    }
 
+    LOG(Plugins, "Primary Plug-In Detection: success - found a candidate plug-in - inform it.");
     m_didFindPrimarySnapshottedPlugin = true;
     m_primaryPlugInPageOrigin = m_page->mainFrame()->document()->baseURL().host();
     m_primaryPlugInOrigin = candidatePlugIn->loadedUrl().host();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to