Title: [175375] trunk/Source/WebCore
Revision
175375
Author
[email protected]
Date
2014-10-30 12:04:29 -0700 (Thu, 30 Oct 2014)

Log Message

Add diagnostic logging to track page loads.
https://bugs.webkit.org/show_bug.cgi?id=138205
<rdar://problem/18173017>

Reviewed by Jer Noble.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
* page/DiagnosticLoggingKeys.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (175374 => 175375)


--- trunk/Source/WebCore/ChangeLog	2014-10-30 18:48:43 UTC (rev 175374)
+++ trunk/Source/WebCore/ChangeLog	2014-10-30 19:04:29 UTC (rev 175375)
@@ -1,3 +1,18 @@
+2014-10-30  Eric Carlson  <[email protected]>
+
+        Add diagnostic logging to track page loads.
+        https://bugs.webkit.org/show_bug.cgi?id=138205
+        <rdar://problem/18173017>
+
+        Reviewed by Jer Noble.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.
+
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
+        * page/DiagnosticLoggingKeys.h:
+
 2014-10-24  Philippe Normand  <[email protected]>
 
         [GStreamer] Video resolution changes trigger a crash in the TextureMapper

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (175374 => 175375)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2014-10-30 18:48:43 UTC (rev 175374)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2014-10-30 19:04:29 UTC (rev 175375)
@@ -47,6 +47,7 @@
 #include "DOMImplementation.h"
 #include "DOMWindow.h"
 #include "DatabaseManager.h"
+#include "DiagnosticLoggingKeys.h"
 #include "Document.h"
 #include "DocumentLoadTiming.h"
 #include "DocumentLoader.h"
@@ -2241,7 +2242,8 @@
                 return;
 
             m_progressTracker->progressCompleted();
-            if (Page* page = m_frame.page()) {
+            Page* page = m_frame.page();
+            if (page) {
                 if (m_frame.isMainFrame())
                     page->resetRelevantPaintedObjectCounter();
             }
@@ -2261,6 +2263,11 @@
             if (AXObjectCache* cache = m_frame.document()->existingAXObjectCache())
                 cache->frameLoadingEventNotification(&m_frame, loadingEvent);
 
+            if (!page || !page->settings().diagnosticLoggingEnabled())
+                return;
+
+            page->chrome().client().logDiagnosticMessage(DiagnosticLoggingKeys::pageLoadedKey(), emptyString(), error.isNull() ? DiagnosticLoggingKeys::passKey() : DiagnosticLoggingKeys::failKey());
+
             return;
         }
         

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (175374 => 175375)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2014-10-30 18:48:43 UTC (rev 175374)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2014-10-30 19:04:29 UTC (rev 175375)
@@ -83,4 +83,9 @@
     return ASCIILiteral("noop");
 }
 
+String DiagnosticLoggingKeys::pageLoadedKey()
+{
+    return WTF::ASCIILiteral("pageLoaded");
 }
+
+}

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (175374 => 175375)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2014-10-30 18:48:43 UTC (rev 175374)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2014-10-30 19:04:29 UTC (rev 175375)
@@ -41,6 +41,7 @@
     static String pageContainsAtLeastOnePluginKey();
     static String pageContainsMediaEngineKey();
     static String pageContainsAtLeastOneMediaEngineKey();
+    static String pageLoadedKey();
 
     // Success keys.
     static String passKey();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to