⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 254147 in webkit


Ignore:
Timestamp:
Jan 7, 2020, 12:38:48 PM (7 years ago)
Author:
Keith Rollin
Message:

Reformat WebFrameLoaderClient logging
​https://bugs.webkit.org/show_bug.cgi?id=205869
<rdar://problem/58379240>

Reviewed by Brent Fulgham.

Update the format used by WebFrameLoaderClient in its RELEASE_LOG
logging. Use the format used by WebPageProxy and
NetworkResourceLoader, which is generally of the form:

<object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

0x4a1d7c310 - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = 0x7f83ba009208

becomes:

0x4a1d7c310 - [webFrame=0x7ff703f03b68, webFrameID=3, webPage=0x7ff704831808, webPageID=15] WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition

No new tests - no added or changed functionality.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r254144 r254147  
     12020-01-07  Keith Rollin  <krollin@apple.com>
     2
     3        Reformat WebFrameLoaderClient logging
     4        https://bugs.webkit.org/show_bug.cgi?id=205869
     5        <rdar://problem/58379240>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Update the format used by WebFrameLoaderClient in its RELEASE_LOG
     10        logging. Use the format used by WebPageProxy and
     11        NetworkResourceLoader, which is generally of the form:
     12
     13            <object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>
     14
     15        So, for example:
     16
     17            0x4a1d7c310 - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = 0x7f83ba009208
     18
     19        becomes:
     20
     21            0x4a1d7c310 - [webFrame=0x7ff703f03b68, webFrameID=3, webPage=0x7ff704831808, webPageID=15] WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition
     22
     23        No new tests - no added or changed functionality.
     24
     25        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     26        (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
     27        (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
     28        (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
     29        (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
     30
    1312020-01-07  Daniel Bates  <dabates@apple.com>
    232
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r253634 r254147  
    9797#include <wtf/ProcessPrivilege.h>
    9898
     99#define PREFIX_PARAMETERS "%p - [webFrame=%p, webFrameID=%" PRIu64 ", webPage=%p, webPageID=%" PRIu64 "] WebFrameLoaderClient::"
     100#define WEBFRAME (webFrame())
     101#define WEBFRAMEID (WEBFRAME ? WEBFRAME->frameID().toUInt64() : 0)
     102#define WEBPAGE (WEBFRAME ? WEBFRAME->page() : nullptr)
     103#define WEBPAGEID (WEBPAGE ? WEBPAGE->identifier().toUInt64() : 0)
     104
     105#define WEBFRAMELOADERCLIENT_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, PREFIX_PARAMETERS fmt, this, WEBFRAME, WEBFRAMEID, WEBPAGE, WEBPAGEID, ##__VA_ARGS__)
     106#define WEBFRAMELOADERCLIENT_RELEASE_LOG_ERROR(channel, fmt, ...) RELEASE_LOG_ERROR(channel, PREFIX_PARAMETERS fmt, this, WEBFRAME, WEBFRAMEID, WEBPAGE, WEBPAGEID, ##__VA_ARGS__)
     107#define WEBFRAMELOADERCLIENT_RELEASE_LOG_FAULT(channel, fmt, ...) RELEASE_LOG_FAULT(channel, PREFIX_PARAMETERS fmt, this, WEBFRAME, WEBFRAMEID, WEBPAGE, WEBPAGEID, ##__VA_ARGS__)
     108
    99109namespace WebKit {
    100110using namespace WebCore;
    … …  
    327337    WebDocumentLoader* documentLoader = static_cast<WebDocumentLoader*>(m_frame->coreFrame()->loader().provisionalDocumentLoader());
    328338    if (!documentLoader) {
    329         RELEASE_LOG_FAULT(Loading, "WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad called with no provisional DocumentLoader. FrameState is %i. FrameLoaderStateMachine stateForDebugging - %i", m_frame->coreFrame()->loader().state(), m_frame->coreFrame()->loader().stateMachine().stateForDebugging());
     339        WEBFRAMELOADERCLIENT_RELEASE_LOG_FAULT(Loading, "dispatchDidReceiveServerRedirectForProvisionalLoad: Called with no provisional DocumentLoader (frameState=%i, stateForDebugging=%i)", m_frame->coreFrame()->loader().state(), m_frame->coreFrame()->loader().stateMachine().stateForDebugging());
    330340        return;
    331341    }
    … …  
    561571        return;
    562572
    563     RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailProvisionalLoad: (webPageID=%" PRIu64 ", frameID=%" PRIu64 ")", this, webPage->identifier().toUInt64(), m_frame->frameID().toUInt64());
     573    WEBFRAMELOADERCLIENT_RELEASE_LOG(Network, "dispatchDidFailProvisionalLoad:");
    564574
    565575    RefPtr<API::Object> userData;
    … …  
    597607        return;
    598608
    599     RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailLoad: (webPageID=%" PRIu64 ", frameID=%" PRIu64 ")", this, webPage->identifier().toUInt64(), m_frame->frameID().toUInt64());
     609    WEBFRAMELOADERCLIENT_RELEASE_LOG(Network, "dispatchDidFailLoad:");
    600610
    601611    RefPtr<API::Object> userData;
    … …  
    678688
    679689    if (milestones & DidFirstLayout) {
    680         RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidFirstLayoutForFrame, page = %p", this, webPage);
     690        WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching DidFirstLayoutForFrame");
    681691
    682692        // FIXME: We should consider removing the old didFirstLayout API since this is doing double duty with the
    … …  
    688698        // FIXME: Do this on DidFirstVisuallyNonEmptyLayout when Mac Safari is able to handle it (<rdar://problem/17580021>)
    689699        if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) {
    690             RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = %p", this, webPage);
     700            WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition");
    691701            webPage->didCompletePageTransition();
    692702            m_didCompletePageTransition = true;
    … …  
    720730    addIfSet(DidFirstMeaningfulPaint, "DidFirstMeaningfulPaint"_s);
    721731
    722     RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidReachLayoutMilestone, page = %p, milestones = %{public}s", this, webPage, builder.toString().utf8().data());
     732    WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching DidReachLayoutMilestone (milestones=%{public}s)", builder.toString().utf8().data());
    723733#endif
    724734
    … …  
    728738    if (milestones & DidFirstVisuallyNonEmptyLayout) {
    729739        if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) {
    730             RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = %p", this, webPage);
     740            WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition");
    731741            webPage->didCompletePageTransition();
    732742            m_didCompletePageTransition = true;
    … …  
    735745        // FIXME: We should consider removing the old didFirstVisuallyNonEmptyLayoutForFrame API since this is doing
    736746        // double duty with the new didLayout API.
    737         RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidFirstVisuallyNonEmptyLayoutForFrame, page = %p", this, webPage);
     747        WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching DidFirstVisuallyNonEmptyLayoutForFrame");
    738748        webPage->injectedBundleLoaderClient().didFirstVisuallyNonEmptyLayoutForFrame(*webPage, *m_frame, userData);
    739749        webPage->send(Messages::WebPageProxy::DidFirstVisuallyNonEmptyLayoutForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
    … …  
    19241934
    19251935} // namespace WebKit
     1936
     1937#undef PREFIX_PARAMETERS
     1938#undef WEBFRAME
     1939#undef WEBFRAMEID
     1940#undef WEBPAGE
     1941#undef WEBPAGEID
Note: See TracChangeset for help on using the changeset viewer.