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

Changeset 278315 in webkit


Ignore:
Timestamp:
Jun 1, 2021, 11:14:29 AM (5 years ago)
Author:
Chris Dumez
Message:

Enable WebPageProxy's release logging in ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=226342

Reviewed by Geoff Garen.

Enable WebPageProxy's release logging in ephemeral sessions. Our release logging doesn't
contain anything sensitive and not having this logging makes it hard to debug issues in
apps using ephemeral sessions.

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:

(WebKit::SOAuthorizationSession::shouldStart):
(WebKit::SOAuthorizationSession::start):
(WebKit::SOAuthorizationSession::continueStartAfterGetAuthorizationHints):
(WebKit::SOAuthorizationSession::continueStartAfterDecidePolicy):
(WebKit::SOAuthorizationSession::fallBackToWebPath):
(WebKit::SOAuthorizationSession::abort):
(WebKit::SOAuthorizationSession::complete):
(WebKit::SOAuthorizationSession::presentViewController):
(WebKit::SOAuthorizationSession::dismissViewController):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::processDidTerminate):
(WebKit::ProvisionalPageProxy::cancel):
(WebKit::ProvisionalPageProxy::loadData):
(WebKit::ProvisionalPageProxy::loadRequest):
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
(WebKit::ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation):
(WebKit::ProvisionalPageProxy::didCreateContextInGPUProcessForVisibilityPropagation):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPageProxy::~WebPageProxy):
(WebKit::WebPageProxy::launchProcess):
(WebKit::WebPageProxy::suspendCurrentPageIfPossible):
(WebKit::WebPageProxy::swapToProvisionalPage):
(WebKit::WebPageProxy::launchProcessForReload):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::tryCloseTimedOut):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::tryRestoreScrollPosition):
(WebKit::WebPageProxy::updateActivityState):
(WebKit::WebPageProxy::updateThrottleState):
(WebKit::WebPageProxy::clearAudibleActivity):
(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::commitProvisionalPage):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::suspend):
(WebKit::WebPageProxy::resume):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didExplicitOpenForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirectShared):
(WebKit::WebPageProxy::closePage):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::resetStateAfterProcessTermination):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
(WebKit::WebPageProxy::tryReloadAfterProcessTermination):
(WebKit::WebPageProxy::requestStorageSpace):
(WebKit::WebPageProxy::updateReportedMediaCaptureState):
(WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
(WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground):
(WebKit::WebPageProxy::logger):

  • UIProcess/WebPageProxy.h:
Location:
trunk/Source/WebKit
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r278308 r278315  
     12021-06-01  Chris Dumez  <cdumez@apple.com>
     2
     3        Enable WebPageProxy's release logging in ephemeral sessions
     4        https://bugs.webkit.org/show_bug.cgi?id=226342
     5
     6        Reviewed by Geoff Garen.
     7
     8        Enable WebPageProxy's release logging in ephemeral sessions. Our release logging doesn't
     9        contain anything sensitive and not having this logging makes it hard to debug issues in
     10        apps using ephemeral sessions.
     11
     12        * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
     13        (WebKit::SOAuthorizationSession::shouldStart):
     14        (WebKit::SOAuthorizationSession::start):
     15        (WebKit::SOAuthorizationSession::continueStartAfterGetAuthorizationHints):
     16        (WebKit::SOAuthorizationSession::continueStartAfterDecidePolicy):
     17        (WebKit::SOAuthorizationSession::fallBackToWebPath):
     18        (WebKit::SOAuthorizationSession::abort):
     19        (WebKit::SOAuthorizationSession::complete):
     20        (WebKit::SOAuthorizationSession::presentViewController):
     21        (WebKit::SOAuthorizationSession::dismissViewController):
     22        * UIProcess/ProvisionalPageProxy.cpp:
     23        (WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
     24        (WebKit::ProvisionalPageProxy::processDidTerminate):
     25        (WebKit::ProvisionalPageProxy::cancel):
     26        (WebKit::ProvisionalPageProxy::loadData):
     27        (WebKit::ProvisionalPageProxy::loadRequest):
     28        (WebKit::ProvisionalPageProxy::goToBackForwardItem):
     29        (WebKit::ProvisionalPageProxy::didCreateMainFrame):
     30        (WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
     31        (WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
     32        (WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
     33        (WebKit::ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation):
     34        (WebKit::ProvisionalPageProxy::didCreateContextInGPUProcessForVisibilityPropagation):
     35        * UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
     36        (WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed const):
     37        * UIProcess/WebPageProxy.cpp:
     38        (WebKit::m_limitsNavigationsToAppBoundDomains):
     39        (WebKit::WebPageProxy::~WebPageProxy):
     40        (WebKit::WebPageProxy::launchProcess):
     41        (WebKit::WebPageProxy::suspendCurrentPageIfPossible):
     42        (WebKit::WebPageProxy::swapToProvisionalPage):
     43        (WebKit::WebPageProxy::launchProcessForReload):
     44        (WebKit::WebPageProxy::close):
     45        (WebKit::WebPageProxy::tryClose):
     46        (WebKit::WebPageProxy::tryCloseTimedOut):
     47        (WebKit::WebPageProxy::loadRequest):
     48        (WebKit::WebPageProxy::loadRequestWithNavigationShared):
     49        (WebKit::WebPageProxy::loadFile):
     50        (WebKit::WebPageProxy::loadData):
     51        (WebKit::WebPageProxy::loadDataWithNavigationShared):
     52        (WebKit::WebPageProxy::loadSimulatedRequest):
     53        (WebKit::WebPageProxy::loadAlternateHTML):
     54        (WebKit::WebPageProxy::loadWebArchiveData):
     55        (WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
     56        (WebKit::WebPageProxy::stopLoading):
     57        (WebKit::WebPageProxy::reload):
     58        (WebKit::WebPageProxy::goToBackForwardItem):
     59        (WebKit::WebPageProxy::tryRestoreScrollPosition):
     60        (WebKit::WebPageProxy::updateActivityState):
     61        (WebKit::WebPageProxy::updateThrottleState):
     62        (WebKit::WebPageProxy::clearAudibleActivity):
     63        (WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):
     64        (WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
     65        (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
     66        (WebKit::WebPageProxy::commitProvisionalPage):
     67        (WebKit::WebPageProxy::continueNavigationInNewProcess):
     68        (WebKit::WebPageProxy::suspend):
     69        (WebKit::WebPageProxy::resume):
     70        (WebKit::WebPageProxy::restoreFromSessionState):
     71        (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
     72        (WebKit::WebPageProxy::didExplicitOpenForFrame):
     73        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
     74        (WebKit::WebPageProxy::willPerformClientRedirectForFrame):
     75        (WebKit::WebPageProxy::didCancelClientRedirectForFrame):
     76        (WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
     77        (WebKit::WebPageProxy::didCommitLoadForFrame):
     78        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
     79        (WebKit::WebPageProxy::didFinishLoadForFrame):
     80        (WebKit::WebPageProxy::didFailLoadForFrame):
     81        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
     82        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
     83        (WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
     84        (WebKit::WebPageProxy::didPerformClientRedirectShared):
     85        (WebKit::WebPageProxy::didPerformServerRedirectShared):
     86        (WebKit::WebPageProxy::closePage):
     87        (WebKit::WebPageProxy::processDidBecomeUnresponsive):
     88        (WebKit::WebPageProxy::processDidBecomeResponsive):
     89        (WebKit::WebPageProxy::resetStateAfterProcessTermination):
     90        (WebKit::WebPageProxy::dispatchProcessDidTerminate):
     91        (WebKit::WebPageProxy::tryReloadAfterProcessTermination):
     92        (WebKit::WebPageProxy::requestStorageSpace):
     93        (WebKit::WebPageProxy::updateReportedMediaCaptureState):
     94        (WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
     95        (WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground):
     96        (WebKit::WebPageProxy::logger):
     97        * UIProcess/WebPageProxy.h:
     98
    1992021-06-01  Per Arne  <pvollan@apple.com>
    2100
  • trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm

    r278253 r278315  
    7979}
    8080
    81 #define RELEASE_LOG_IF_ALLOWED(...) RELEASE_LOG_IF(_page && _page->isAlwaysOnLoggingAllowed(), ViewState, __VA_ARGS__)
     81#define WKWEBVIEW_RELEASE_LOG(...) RELEASE_LOG(ViewState, __VA_ARGS__)
    8282
    8383static const Seconds delayBeforeNoVisibleContentsRectsLogging = 1_s;
     
    687687- (void)_processWillSwap
    688688{
    689     RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _processWillSwap]", self);
     689    WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _processWillSwap]", self);
    690690    [self _processWillSwapOrDidExit];
    691691}
     
    693693- (void)_processDidExit
    694694{
    695     RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _processDidExit]", self);
     695    WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _processDidExit]", self);
    696696
    697697    [self _processWillSwapOrDidExit];
     
    705705- (void)_didRelaunchProcess
    706706{
    707     RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _didRelaunchProcess]", self);
     707    WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _didRelaunchProcess]", self);
    708708    _hasScheduledVisibleRectUpdate = NO;
    709709    _viewStabilityWhenVisibleContentRectUpdateScheduled = { };
     
    788788{
    789789    if (_didDeferUpdateVisibleContentRectsForUnstableScrollView) {
    790         RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _didCommitLayerTree:] - received a commit (%llu) while deferring visible content rect updates (_dynamicViewportUpdateMode %d, _needsResetViewStateAfterCommitLoadForMainFrame %d (wants commit %llu), sizeChangedSinceLastVisibleContentRectUpdate %d, [_scrollView isZoomBouncing] %d, _currentlyAdjustingScrollViewInsetsForKeyboard %d)",
     790        WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _didCommitLayerTree:] - received a commit (%llu) while deferring visible content rect updates (_dynamicViewportUpdateMode %d, _needsResetViewStateAfterCommitLoadForMainFrame %d (wants commit %llu), sizeChangedSinceLastVisibleContentRectUpdate %d, [_scrollView isZoomBouncing] %d, _currentlyAdjustingScrollViewInsetsForKeyboard %d)",
    791791        self, _page->identifier().toUInt64(), layerTreeTransaction.transactionID().toUInt64(), _dynamicViewportUpdateMode, _needsResetViewStateAfterCommitLoadForMainFrame, _firstPaintAfterCommitLoadTransactionID.toUInt64(), [_contentView sizeChangedSinceLastVisibleContentRectUpdate], [_scrollView isZoomBouncing], _currentlyAdjustingScrollViewInsetsForKeyboard);
    792792    }
     
    795795        auto timeSinceFirstRequestWithPendingCommit = MonotonicTime::now() - *_timeOfFirstVisibleContentRectUpdateWithPendingCommit;
    796796        if (timeSinceFirstRequestWithPendingCommit > delayBeforeNoCommitsLogging)
    797             RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _didCommitLayerTree:] - finally received commit %.2fs after visible content rect update request; transactionID %llu", self, _page->identifier().toUInt64(), timeSinceFirstRequestWithPendingCommit.value(), layerTreeTransaction.transactionID().toUInt64());
     797            WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _didCommitLayerTree:] - finally received commit %.2fs after visible content rect update request; transactionID %llu", self, _page->identifier().toUInt64(), timeSinceFirstRequestWithPendingCommit.value(), layerTreeTransaction.transactionID().toUInt64());
    798798        _timeOfFirstVisibleContentRectUpdateWithPendingCommit = std::nullopt;
    799799    }
     
    895895
    896896    if (_resizeAnimationView)
    897         RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _didCommitLayerTree:] - dynamicViewportUpdateMode is NotResizing, but still have a live resizeAnimationView (unpaired begin/endAnimatedResize?)", self);
     897        WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _didCommitLayerTree:] - dynamicViewportUpdateMode is NotResizing, but still have a live resizeAnimationView (unpaired begin/endAnimatedResize?)", self);
    898898
    899899    [self _updateScrollViewForTransaction:layerTreeTransaction];
     
    19651965        WKWebView *webView = retainedSelf.get();
    19661966        if (![webView _isValid]) {
    1967             RELEASE_LOG_IF(webView._page && webView._page->isAlwaysOnLoggingAllowed(), ViewState, "In CATransaction preCommitHandler, WKWebView %p is invalid", webView);
     1967            WKWEBVIEW_RELEASE_LOG("In CATransaction preCommitHandler, WKWebView %p is invalid", webView);
    19681968            return;
    19691969        }
     
    19721972            [webView _updateVisibleContentRects];
    19731973        } @catch (NSException *exception) {
    1974             RELEASE_LOG_IF(webView._page && webView._page->isAlwaysOnLoggingAllowed(), ViewState, "In CATransaction preCommitHandler, -[WKWebView %p _updateVisibleContentRects] threw an exception", webView);
     1974            WKWEBVIEW_RELEASE_LOG("In CATransaction preCommitHandler, -[WKWebView %p _updateVisibleContentRects] threw an exception", webView);
    19751975        }
    19761976        webView->_hasScheduledVisibleRectUpdate = NO;
     
    19851985        auto timeNow = MonotonicTime::now();
    19861986        if ((timeNow - _timeOfRequestForVisibleContentRectUpdate) > delayBeforeNoVisibleContentsRectsLogging) {
    1987             RELEASE_LOG_IF_ALLOWED("-[WKWebView %p _scheduleVisibleContentRectUpdateAfterScrollInView]: _hasScheduledVisibleRectUpdate is true but haven't updated visible content rects for %.2fs (last update was %.2fs ago) - valid %d",
     1987            WKWEBVIEW_RELEASE_LOG("-[WKWebView %p _scheduleVisibleContentRectUpdateAfterScrollInView]: _hasScheduledVisibleRectUpdate is true but haven't updated visible content rects for %.2fs (last update was %.2fs ago) - valid %d",
    19881988                self, (timeNow - _timeOfRequestForVisibleContentRectUpdate).value(), (timeNow - _timeOfLastVisibleContentRectUpdate).value(), [self _isValid]);
    19891989        }
     
    20802080        [_customContentView web_computedContentInsetDidChange];
    20812081        _didDeferUpdateVisibleContentRectsForAnyReason = YES;
    2082         RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - usesStandardContentView is NO, bailing", self, _page->identifier().toUInt64());
     2082        WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - usesStandardContentView is NO, bailing", self, _page->identifier().toUInt64());
    20832083        return;
    20842084    }
     
    20882088        auto timeSinceFirstRequestWithPendingCommit = timeNow - *_timeOfFirstVisibleContentRectUpdateWithPendingCommit;
    20892089        if (timeSinceFirstRequestWithPendingCommit > delayBeforeNoCommitsLogging)
    2090             RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - have not received a commit %.2fs after visible content rect update; lastTransactionID %llu", self, _page->identifier().toUInt64(), timeSinceFirstRequestWithPendingCommit.value(), _lastTransactionID.toUInt64());
     2090            WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - have not received a commit %.2fs after visible content rect update; lastTransactionID %llu", self, _page->identifier().toUInt64(), timeSinceFirstRequestWithPendingCommit.value(), _lastTransactionID.toUInt64());
    20912091    }
    20922092
     
    20942094        _didDeferUpdateVisibleContentRectsForUIScrollViewDelegateCallback = YES;
    20952095        _didDeferUpdateVisibleContentRectsForAnyReason = YES;
    2096         RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - _invokingUIScrollViewDelegateCallback is YES, bailing", self, _page->identifier().toUInt64());
     2096        WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - _invokingUIScrollViewDelegateCallback is YES, bailing", self, _page->identifier().toUInt64());
    20972097        return;
    20982098    }
     
    21072107        _didDeferUpdateVisibleContentRectsForAnyReason = YES;
    21082108        _didDeferUpdateVisibleContentRectsForUnstableScrollView = YES;
    2109         RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - scroll view state is non-stable, bailing (_dynamicViewportUpdateMode %d, _needsResetViewStateAfterCommitLoadForMainFrame %d, sizeChangedSinceLastVisibleContentRectUpdate %d, [_scrollView isZoomBouncing] %d, _currentlyAdjustingScrollViewInsetsForKeyboard %d)",
     2109        WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - scroll view state is non-stable, bailing (_dynamicViewportUpdateMode %d, _needsResetViewStateAfterCommitLoadForMainFrame %d, sizeChangedSinceLastVisibleContentRectUpdate %d, [_scrollView isZoomBouncing] %d, _currentlyAdjustingScrollViewInsetsForKeyboard %d)",
    21102110            self, _page->identifier().toUInt64(), _dynamicViewportUpdateMode, _needsResetViewStateAfterCommitLoadForMainFrame, [_contentView sizeChangedSinceLastVisibleContentRectUpdate], [_scrollView isZoomBouncing], _currentlyAdjustingScrollViewInsetsForKeyboard);
    21112111        return;
     
    21132113
    21142114    if (_didDeferUpdateVisibleContentRectsForAnyReason)
    2115         RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - performing first visible content rect update after deferring updates", self, _page->identifier().toUInt64());
     2115        WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _updateVisibleContentRects:] - performing first visible content rect update after deferring updates", self, _page->identifier().toUInt64());
    21162116
    21172117    _didDeferUpdateVisibleContentRectsForUIScrollViewDelegateCallback = NO;
     
    21672167
    21682168    if ((timeNow - _timeOfRequestForVisibleContentRectUpdate) > delayBeforeNoVisibleContentsRectsLogging)
    2169         RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _updateVisibleContentRects:] finally ran %.2fs after being scheduled", self, (timeNow - _timeOfRequestForVisibleContentRectUpdate).value());
     2169        WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _updateVisibleContentRects:] finally ran %.2fs after being scheduled", self, (timeNow - _timeOfRequestForVisibleContentRectUpdate).value());
    21702170
    21712171    _alwaysSendNextVisibleContentRectUpdate = NO;
     
    21932193- (void)_cancelAnimatedResize
    21942194{
    2195     RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _cancelAnimatedResize] _dynamicViewportUpdateMode %d", self, _page->identifier().toUInt64(), _dynamicViewportUpdateMode);
     2195    WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _cancelAnimatedResize] _dynamicViewportUpdateMode %d", self, _page->identifier().toUInt64(), _dynamicViewportUpdateMode);
    21962196
    21972197    if (_dynamicViewportUpdateMode == WebKit::DynamicViewportUpdateMode::NotResizing)
     
    22252225    if (!_resizeAnimationView) {
    22262226        // Paranoia. If _resizeAnimationView is null we'll end up setting a zero scale on the content view.
    2227         RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _didCompleteAnimatedResize:] - _resizeAnimationView is nil", self);
     2227        WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _didCompleteAnimatedResize:] - _resizeAnimationView is nil", self);
    22282228        [self _cancelAnimatedResize];
    22292229        return;
    22302230    }
    22312231
    2232     RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _didCompleteAnimatedResize]", self, _page->identifier().toUInt64());
     2232    WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _didCompleteAnimatedResize]", self, _page->identifier().toUInt64());
    22332233
    22342234    NSUInteger indexOfResizeAnimationView = [[_scrollView subviews] indexOfObject:_resizeAnimationView.get()];
     
    29012901    }
    29022902
    2903     RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _beginAnimatedResizeWithUpdates:]", self, _page->identifier().toUInt64());
     2903    WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _beginAnimatedResizeWithUpdates:]", self, _page->identifier().toUInt64());
    29042904
    29052905    _dynamicViewportUpdateMode = WebKit::DynamicViewportUpdateMode::ResizingWithAnimation;
     
    30383038- (void)_endAnimatedResize
    30393039{
    3040     RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _endAnimatedResize] _dynamicViewportUpdateMode %d", self, _page->identifier().toUInt64(), _dynamicViewportUpdateMode);
     3040    WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _endAnimatedResize] _dynamicViewportUpdateMode %d", self, _page->identifier().toUInt64(), _dynamicViewportUpdateMode);
    30413041
    30423042    // If we already have an up-to-date layer tree, immediately complete
     
    30493049- (void)_resizeWhileHidingContentWithUpdates:(void (^)(void))updateBlock
    30503050{
    3051     RELEASE_LOG_IF_ALLOWED("%p (pageProxyID=%llu) -[WKWebView _resizeWhileHidingContentWithUpdates:]", self, _page->identifier().toUInt64());
     3051    WKWEBVIEW_RELEASE_LOG("%p (pageProxyID=%llu) -[WKWebView _resizeWhileHidingContentWithUpdates:]", self, _page->identifier().toUInt64());
    30523052
    30533053    [self _beginAnimatedResizeWithUpdates:updateBlock];
     
    33533353@end
    33543354
     3355#undef WKWEBVIEW_RELEASE_LOG
     3356
    33553357#endif // PLATFORM(IOS_FAMILY)
  • trunk/Source/WebKit/UIProcess/Cocoa/LegacyDownloadClient.mm

    r270638 r278315  
    283283#if PLATFORM(IOS_FAMILY)
    284284    if (auto* webPage = downloadProxy.originatingPage()) {
    285         RELEASE_LOG_IF(webPage->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - UIProcess is taking a background assertion because it is downloading a system preview", this);
     285        RELEASE_LOG(ProcessSuspension, "%p - UIProcess is taking a background assertion because it is downloading a system preview", this);
    286286        ASSERT(!m_activity);
    287287        m_activity = webPage->process().throttler().backgroundActivity("System preview download"_s).moveToUniquePtr();
     
    296296#if PLATFORM(IOS_FAMILY)
    297297    if (m_activity) {
    298         RELEASE_LOG_IF(downloadProxy.originatingPage()->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p UIProcess is releasing a background assertion because a system preview download completed", this);
     298        RELEASE_LOG(ProcessSuspension, "%p UIProcess is releasing a background assertion because a system preview download completed", this);
    299299        m_activity = nullptr;
    300300    }
  • trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm

    r277740 r278315  
    13691369    switch (reason) {
    13701370    case NetworkActivityReleaseReason::LoadCompleted:
    1371         RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p NavigationState is releasing background process assertion because a page load completed", this);
     1371        RELEASE_LOG(ProcessSuspension, "%p NavigationState is releasing background process assertion because a page load completed", this);
    13721372        break;
    13731373    case NetworkActivityReleaseReason::ScreenLocked:
    1374         RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p NavigationState is releasing background process assertion because the screen was locked", this);
     1374        RELEASE_LOG(ProcessSuspension, "%p NavigationState is releasing background process assertion because the screen was locked", this);
    13751375        break;
    13761376    }
     
    13891389
    13901390        if (m_releaseNetworkActivityTimer.isActive()) {
    1391             RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NavigationState keeps its process network assertion because a new page load started", this);
     1391            RELEASE_LOG(ProcessSuspension, "%p - NavigationState keeps its process network assertion because a new page load started", this);
    13921392            m_releaseNetworkActivityTimer.stop();
    13931393        }
    13941394        if (!m_networkActivity) {
    1395             RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NavigationState is taking a process network assertion because a page load started", this);
     1395            RELEASE_LOG(ProcessSuspension, "%p - NavigationState is taking a process network assertion because a page load started", this);
    13961396            m_networkActivity = m_webView->_page->process().throttler().backgroundActivity("Page Load"_s).moveToUniquePtr();
    13971397        }
     
    13991399        // The application is visible so we delay releasing the background activity for 3 seconds to give it a chance to start another navigation
    14001400        // before suspending the WebContent process <rdar://problem/27910964>.
    1401         RELEASE_LOG_IF(m_webView->_page->isAlwaysOnLoggingAllowed(), ProcessSuspension, "%p - NavigationState will release its process network assertion soon because the page load completed", this);
     1401        RELEASE_LOG(ProcessSuspension, "%p - NavigationState will release its process network assertion soon because the page load completed", this);
    14021402        m_releaseNetworkActivityTimer.startOneShot(3_s);
    14031403    }
  • trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm

    r276621 r278315  
    4545#import <wtf/Vector.h>
    4646
    47 #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_page && m_page->isAlwaysOnLoggingAllowed(), AppSSO, "%p - [InitiatingAction=%s] SOAuthorizationSession::" fmt, this, toString(m_action), ##__VA_ARGS__)
     47#define AUTHORIZATIONSESSION_RELEASE_LOG(fmt, ...) RELEASE_LOG(AppSSO, "%p - [InitiatingAction=%s] SOAuthorizationSession::" fmt, this, toString(m_action), ##__VA_ARGS__)
    4848
    4949namespace WebKit {
     
    118118void SOAuthorizationSession::shouldStart()
    119119{
    120     RELEASE_LOG_IF_ALLOWED("shouldStart:");
     120    AUTHORIZATIONSESSION_RELEASE_LOG("shouldStart:");
    121121
    122122    ASSERT(m_state == State::Idle);
     
    128128void SOAuthorizationSession::start()
    129129{
    130     RELEASE_LOG_IF_ALLOWED("start:");
     130    AUTHORIZATIONSESSION_RELEASE_LOG("start:");
    131131
    132132    ASSERT((m_state == State::Idle || m_state == State::Waiting) && m_navigationAction);
    133133    m_state = State::Active;
    134134    [m_soAuthorization getAuthorizationHintsWithURL:m_navigationAction->request().url() responseCode:0 completion:makeBlockPtr([this, weakThis = makeWeakPtr(*this)] (SOAuthorizationHints *authorizationHints, NSError *error) {
    135         RELEASE_LOG_IF_ALLOWED("start: Receive SOAuthorizationHints (error=%ld)", error ? error.code : 0);
     135        AUTHORIZATIONSESSION_RELEASE_LOG("start: Receive SOAuthorizationHints (error=%ld)", error ? error.code : 0);
    136136
    137137        if (!weakThis || error || !authorizationHints)
     
    143143void SOAuthorizationSession::continueStartAfterGetAuthorizationHints(const String& hints)
    144144{
    145     RELEASE_LOG_IF_ALLOWED("continueStartAfterGetAuthorizationHints: (hints=%s)", hints.utf8().data());
     145    AUTHORIZATIONSESSION_RELEASE_LOG("continueStartAfterGetAuthorizationHints: (hints=%s)", hints.utf8().data());
    146146
    147147    ASSERT(m_state == State::Active);
     
    159159{
    160160    if (policy == SOAuthorizationLoadPolicy::Ignore) {
    161         RELEASE_LOG_IF_ALLOWED("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Ignore");
     161        AUTHORIZATIONSESSION_RELEASE_LOG("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Ignore");
    162162
    163163        fallBackToWebPath();
     
    165165    }
    166166
    167     RELEASE_LOG_IF_ALLOWED("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Allow");
     167    AUTHORIZATIONSESSION_RELEASE_LOG("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Allow");
    168168
    169169    if (!m_soAuthorization || !m_page || !m_navigationAction)
     
    193193void SOAuthorizationSession::fallBackToWebPath()
    194194{
    195     RELEASE_LOG_IF_ALLOWED("fallBackToWebPath:");
     195    AUTHORIZATIONSESSION_RELEASE_LOG("fallBackToWebPath:");
    196196
    197197    if (m_state != State::Active)
     
    203203void SOAuthorizationSession::abort()
    204204{
    205     RELEASE_LOG_IF_ALLOWED("abort:");
     205    AUTHORIZATIONSESSION_RELEASE_LOG("abort:");
    206206
    207207    if (m_state == State::Idle || m_state == State::Completed)
     
    227227    auto cookies = toCookieVector([NSHTTPCookie cookiesWithResponseHeaderFields:httpResponse.allHeaderFields forURL:response.url()]);
    228228
    229     RELEASE_LOG_IF_ALLOWED("complete: (httpStatusCode=%d, hasCookies=%d, hasData=%d)", response.httpStatusCode(), !cookies.isEmpty(), !!data.length);
     229    AUTHORIZATIONSESSION_RELEASE_LOG("complete: (httpStatusCode=%d, hasCookies=%d, hasData=%d)", response.httpStatusCode(), !cookies.isEmpty(), !!data.length);
    230230
    231231    if (cookies.isEmpty()) {
     
    240240            return;
    241241
    242         RELEASE_LOG_IF_ALLOWED("complete: Cookies are set.");
     242        AUTHORIZATIONSESSION_RELEASE_LOG("complete: Cookies are set.");
    243243
    244244        completeInternal(response, data.get());
     
    248248void SOAuthorizationSession::presentViewController(SOAuthorizationViewController viewController, UICallback uiCallback)
    249249{
    250     RELEASE_LOG_IF_ALLOWED("presentViewController:");
     250    AUTHORIZATIONSESSION_RELEASE_LOG("presentViewController:");
    251251
    252252    ASSERT(m_state == State::Active);
     
    276276    }
    277277
    278     RELEASE_LOG_IF_ALLOWED("presentViewController: Calling beginSheet on %p for sheet %p.", presentingWindow, m_sheetWindow.get());
     278    AUTHORIZATIONSESSION_RELEASE_LOG("presentViewController: Calling beginSheet on %p for sheet %p.", presentingWindow, m_sheetWindow.get());
    279279    [presentingWindow beginSheet:m_sheetWindow.get() completionHandler:nil];
    280280#elif PLATFORM(IOS)
     
    293293void SOAuthorizationSession::dismissViewController()
    294294{
    295     RELEASE_LOG_IF_ALLOWED("dismissViewController:");
     295    AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController:");
    296296
    297297    ASSERT(m_viewController);
     
    304304        auto *presentingWindow = m_page->platformWindow();
    305305        if (presentingWindow.miniaturized) {
    306             RELEASE_LOG_IF_ALLOWED("dismissViewController: Page's window is miniaturized. Waiting to dismiss until active.");
     306            AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: Page's window is miniaturized. Waiting to dismiss until active.");
    307307            if (m_presentingWindowDidDeminiaturizeObserver) {
    308                 RELEASE_LOG_IF_ALLOWED("dismissViewController: [Miniaturized] Already has a deminiaturized observer (%p). Hidden observer is %p", m_presentingWindowDidDeminiaturizeObserver.get(), m_applicationDidUnhideObserver.get());
     308                AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: [Miniaturized] Already has a deminiaturized observer (%p). Hidden observer is %p", m_presentingWindowDidDeminiaturizeObserver.get(), m_applicationDidUnhideObserver.get());
    309309                return;
    310310            }
    311311            m_presentingWindowDidDeminiaturizeObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSWindowDidDeminiaturizeNotification object:presentingWindow queue:nil usingBlock:[protectedThis = makeRefPtr(this), this] (NSNotification *) {
    312                 RELEASE_LOG_IF_ALLOWED("dismissViewController: Window has deminiaturized. Completing the dismissal.");
     312                AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: Window has deminiaturized. Completing the dismissal.");
    313313                dismissViewController();
    314314                [[NSNotificationCenter defaultCenter] removeObserver:m_presentingWindowDidDeminiaturizeObserver.get()];
     
    320320
    321321    if (NSApp.hidden) {
    322         RELEASE_LOG_IF_ALLOWED("dismissViewController: Application is hidden. Waiting to dismiss until active.");
     322        AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: Application is hidden. Waiting to dismiss until active.");
    323323        if (m_applicationDidUnhideObserver) {
    324             RELEASE_LOG_IF_ALLOWED("dismissViewController: [Hidden] Already has an Unhide observer (%p). Deminiaturized observer is %p", m_presentingWindowDidDeminiaturizeObserver.get(), m_applicationDidUnhideObserver.get());
     324            AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: [Hidden] Already has an Unhide observer (%p). Deminiaturized observer is %p", m_presentingWindowDidDeminiaturizeObserver.get(), m_applicationDidUnhideObserver.get());
    325325            return;
    326326        }
    327327        m_applicationDidUnhideObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidUnhideNotification object:NSApp queue:nil usingBlock:[protectedThis = makeRefPtr(this), this] (NSNotification *) {
    328             RELEASE_LOG_IF_ALLOWED("dismissViewController: Application is no longer hidden. Completing the dismissal.");
     328            AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: Application is no longer hidden. Completing the dismissal.");
    329329            dismissViewController();
    330330            [[NSNotificationCenter defaultCenter] removeObserver:m_applicationDidUnhideObserver.get()];
     
    338338
    339339    auto *presentingWindow = m_sheetWindow.get().sheetParent;
    340     RELEASE_LOG_IF_ALLOWED("dismissViewController: Calling endSheet on %p for sheet %p.", presentingWindow, m_sheetWindow.get());
     340    AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: Calling endSheet on %p for sheet %p.", presentingWindow, m_sheetWindow.get());
    341341    [presentingWindow endSheet:m_sheetWindow.get()];
    342342    m_sheetWindow = nullptr;
    343     RELEASE_LOG_IF_ALLOWED("dismissViewController: Finished call with deminiaturized observer (%p) and Hidden observer (%p)", m_presentingWindowDidDeminiaturizeObserver.get(), m_applicationDidUnhideObserver.get());
     343    AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController: Finished call with deminiaturized observer (%p) and Hidden observer (%p)", m_presentingWindowDidDeminiaturizeObserver.get(), m_applicationDidUnhideObserver.get());
    344344#elif PLATFORM(IOS)
    345345    [[m_viewController presentingViewController] dismissViewControllerAnimated:YES completion:nil];
     
    351351} // namespace WebKit
    352352
    353 #undef RELEASE_LOG_IF_ALLOWED
     353#undef AUTHORIZATIONSESSION_RELEASE_LOG
    354354
    355355#endif // HAVE(APP_SSO)
  • trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp

    r278253 r278315  
    5656using namespace WebCore;
    5757
    58 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(m_page.isAlwaysOnLoggingAllowed(), channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i, navigationID=%" PRIu64 "] ProvisionalPageProxy::" fmt, this, m_page.identifier().toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), m_navigationID, ##__VA_ARGS__)
    59 #define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(m_page.isAlwaysOnLoggingAllowed(), channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i, navigationID=%" PRIu64 "] ProvisionalPageProxy::" fmt, this, m_page.identifier().toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), m_navigationID, ##__VA_ARGS__)
     58#define PROVISIONALPAGEPROXY_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i, navigationID=%" PRIu64 "] ProvisionalPageProxy::" fmt, this, m_page.identifier().toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), m_navigationID, ##__VA_ARGS__)
     59#define PROVISIONALPAGEPROXY_RELEASE_LOG_ERROR(channel, fmt, ...) RELEASE_LOG_ERROR(channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i, navigationID=%" PRIu64 "] ProvisionalPageProxy::" fmt, this, m_page.identifier().toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), m_navigationID, ##__VA_ARGS__)
    6060
    6161ProvisionalPageProxy::ProvisionalPageProxy(WebPageProxy& page, Ref<WebProcessProxy>&& process, std::unique_ptr<SuspendedPageProxy> suspendedPage, uint64_t navigationID, bool isServerRedirect, const WebCore::ResourceRequest& request, ProcessSwapRequestedByClient processSwapRequestedByClient, API::WebsitePolicies* websitePolicies)
     
    7777#endif
    7878{
    79     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "ProvisionalPageProxy: suspendedPage=%p", suspendedPage.get());
     79    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "ProvisionalPageProxy: suspendedPage=%p", suspendedPage.get());
    8080
    8181    m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_webPageID, *this);
     
    119119void ProvisionalPageProxy::processDidTerminate()
    120120{
    121     RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "processDidTerminate:");
     121    PROVISIONALPAGEPROXY_RELEASE_LOG_ERROR(ProcessSwapping, "processDidTerminate:");
    122122    m_page.provisionalProcessDidTerminate();
    123123}
     
    136136    ASSERT(m_process->state() == WebProcessProxy::State::Running);
    137137
    138     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "cancel: Simulating a didFailProvisionalLoadForFrame");
     138    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "cancel: Simulating a didFailProvisionalLoadForFrame");
    139139    ASSERT(m_mainFrame);
    140140    auto error = WebKit::cancelledError(m_request);
     
    165165void ProvisionalPageProxy::loadData(API::Navigation& navigation, const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, std::optional<WebsitePoliciesData>&& websitePolicies)
    166166{
    167     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadData:");
     167    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "loadData:");
    168168
    169169    m_page.loadDataWithNavigationShared(m_process.copyRef(), m_webPageID, navigation, data, MIMEType, encoding, baseURL, userData, WebCore::ShouldTreatAsContinuingLoad::Yes, isNavigatingToAppBoundDomain, WTFMove(websitePolicies), navigation.lastNavigationAction().shouldOpenExternalURLsPolicy);
     
    172172void ProvisionalPageProxy::loadRequest(API::Navigation& navigation, WebCore::ResourceRequest&& request, API::Object* userData, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, std::optional<WebsitePoliciesData>&& websitePolicies)
    173173{
    174     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadRequest:");
     174    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "loadRequest:");
    175175
    176176    // If this is a client-side redirect continuing in a new process, then the new process will overwrite the fromItem's URL. In this case,
     
    185185void ProvisionalPageProxy::goToBackForwardItem(API::Navigation& navigation, WebBackForwardListItem& item, RefPtr<API::WebsitePolicies>&& websitePolicies)
    186186{
    187     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "goToBackForwardItem:");
     187    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "goToBackForwardItem:");
    188188
    189189    auto itemStates = m_page.backForwardList().filteredItemStates([this, targetItem = &item](auto& item) {
     
    215215void ProvisionalPageProxy::didCreateMainFrame(FrameIdentifier frameID)
    216216{
    217     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateMainFrame: frameID=%" PRIu64, frameID.toUInt64());
     217    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCreateMainFrame: frameID=%" PRIu64, frameID.toUInt64());
    218218    ASSERT(!m_mainFrame);
    219219
     
    253253        return;
    254254
    255     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didStartProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     255    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didStartProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    256256    ASSERT(m_provisionalLoadURL.isNull());
    257257    m_provisionalLoadURL = url;
     
    273273        return;
    274274
    275     RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "didFailProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     275    PROVISIONALPAGEPROXY_RELEASE_LOG_ERROR(ProcessSwapping, "didFailProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    276276    ASSERT(!m_provisionalLoadURL.isNull());
    277277    m_provisionalLoadURL = { };
     
    289289        return;
    290290
    291     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCommitLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     291    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCommitLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    292292    m_provisionalLoadURL = { };
    293293    m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_webPageID);
     
    422422void ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation(LayerHostingContextID contextID)
    423423{
    424     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateContextInWebProcessForVisibilityPropagation: contextID=%u", contextID);
     424    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCreateContextInWebProcessForVisibilityPropagation: contextID=%u", contextID);
    425425    m_contextIDForVisibilityPropagationInWebProcess = contextID;
    426426}
     
    429429void ProvisionalPageProxy::didCreateContextInGPUProcessForVisibilityPropagation(LayerHostingContextID contextID)
    430430{
    431     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateContextInGPUProcessForVisibilityPropagation: contextID=%u", contextID);
     431    PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCreateContextInGPUProcessForVisibilityPropagation: contextID=%u", contextID);
    432432    m_contextIDForVisibilityPropagationInGPUProcess = contextID;
    433433}
  • trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm

    r274457 r278315  
    505505bool RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed() const
    506506{
    507     return m_webPageProxy.isAlwaysOnLoggingAllowed();
     507    return m_webPageProxy.sessionID().isAlwaysOnLoggingAllowed();
    508508}
    509509
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r278254 r278315  
    316316#define MESSAGE_CHECK_COMPLETION(process, assertion, completion) MESSAGE_CHECK_COMPLETION_BASE(assertion, process->connection(), completion)
    317317
    318 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i] WebPageProxy::" fmt, this, m_identifier.toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), ##__VA_ARGS__)
    319 #define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i] WebPageProxy::" fmt, this, m_identifier.toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), ##__VA_ARGS__)
     318#define WEBPAGEPROXY_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i] WebPageProxy::" fmt, this, m_identifier.toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), ##__VA_ARGS__)
     319#define WEBPAGEPROXY_RELEASE_LOG_ERROR(channel, fmt, ...) RELEASE_LOG_ERROR(channel, "%p - [pageProxyID=%" PRIu64 ", webPageID=%" PRIu64 ", PID=%i] WebPageProxy::" fmt, this, m_identifier.toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), ##__VA_ARGS__)
    320320
    321321// Represents the number of wheel events we can hold in the queue before we start pushing them preemptively.
     
    511511#endif
    512512{
    513     RELEASE_LOG_IF_ALLOWED(Loading, "constructor:");
     513    WEBPAGEPROXY_RELEASE_LOG(Loading, "constructor:");
    514514
    515515    if (!m_configuration->drawsBackground())
     
    573573WebPageProxy::~WebPageProxy()
    574574{
    575     RELEASE_LOG_IF_ALLOWED(Loading, "destructor:");
     575    WEBPAGEPROXY_RELEASE_LOG(Loading, "destructor:");
    576576
    577577    ASSERT(m_process->webPage(m_identifier) != this);
     
    824824    ASSERT(!hasRunningProcess());
    825825
    826     RELEASE_LOG_IF_ALLOWED(Loading, "launchProcess:");
     826    WEBPAGEPROXY_RELEASE_LOG(Loading, "launchProcess:");
    827827
    828828    // In case we are currently connected to the dummy process, we need to make sure the inspector proxy
     
    866866
    867867    if (!hasCommittedAnyProvisionalLoads()) {
    868         RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because has not committed any load yet", m_process->processIdentifier());
     868        WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because has not committed any load yet", m_process->processIdentifier());
    869869        return false;
    870870    }
    871871
    872872    if (isPageOpenedByDOMShowingInitialEmptyDocument()) {
    873         RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because it is showing the initial empty document", m_process->processIdentifier());
     873        WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because it is showing the initial empty document", m_process->processIdentifier());
    874874        return false;
    875875    }
     
    880880    // there is no need to suspend the previous page as there will be no way to get back to it.
    881881    if (fromItem && fromItem == m_backForwardList->currentItem()) {
    882         RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because this is a client-side redirect", m_process->processIdentifier());
     882        WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because this is a client-side redirect", m_process->processIdentifier());
    883883        return false;
    884884    }
    885885
    886886    if (fromItem && fromItem->url() != pageLoadState().url()) {
    887         RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because fromItem's URL does not match the page URL.", m_process->processIdentifier());
     887        WEBPAGEPROXY_RELEASE_LOG_ERROR(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because fromItem's URL does not match the page URL.", m_process->processIdentifier());
    888888        return false;
    889889    }
     
    892892    if (!needsSuspendedPageToPreventFlashing && (!fromItem || !shouldUseBackForwardCache())) {
    893893        if (!fromItem)
    894             RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i there is no associated WebBackForwardListItem", m_process->processIdentifier());
     894            WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i there is no associated WebBackForwardListItem", m_process->processIdentifier());
    895895        else
    896             RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i the back / forward cache is disabled", m_process->processIdentifier());
     896            WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i the back / forward cache is disabled", m_process->processIdentifier());
    897897        return false;
    898898    }
    899899
    900     RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Suspending current page for process pid %i", m_process->processIdentifier());
     900    WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "suspendCurrentPageIfPossible: Suspending current page for process pid %i", m_process->processIdentifier());
    901901    auto suspendedPage = makeUnique<SuspendedPageProxy>(*this, m_process.copyRef(), *mainFrameID, shouldDelayClosingUntilFirstLayerFlush);
    902902
     
    928928{
    929929    ASSERT(!m_isClosed);
    930     RELEASE_LOG_IF_ALLOWED(Loading, "swapToProvisionalPage: newWebPageID=%" PRIu64, provisionalPage->webPageID().toUInt64());
     930    WEBPAGEPROXY_RELEASE_LOG(Loading, "swapToProvisionalPage: newWebPageID=%" PRIu64, provisionalPage->webPageID().toUInt64());
    931931
    932932    m_process = provisionalPage->process();
     
    942942#endif
    943943
     944    // FIXME: Do we really need to disable this logging in ephemeral sessions?
    944945    if (m_logger)
    945         m_logger->setEnabled(this, isAlwaysOnLoggingAllowed());
     946        m_logger->setEnabled(this, !sessionID().isEphemeral());
    946947
    947948    m_hasRunningProcess = true;
     
    10361037RefPtr<API::Navigation> WebPageProxy::launchProcessForReload()
    10371038{
    1038     RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload:");
     1039    WEBPAGEPROXY_RELEASE_LOG(Loading, "launchProcessForReload:");
    10391040
    10401041    if (m_isClosed) {
    1041         RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: page is closed");
     1042        WEBPAGEPROXY_RELEASE_LOG(Loading, "launchProcessForReload: page is closed");
    10421043        return nullptr;
    10431044    }
     
    10481049
    10491050    if (!m_backForwardList->currentItem()) {
    1050         RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: no current item to reload");
     1051        WEBPAGEPROXY_RELEASE_LOG(Loading, "launchProcessForReload: no current item to reload");
    10511052        return nullptr;
    10521053    }
     
    11101111        return;
    11111112
    1112     RELEASE_LOG_IF_ALLOWED(Loading, "close:");
     1113    WEBPAGEPROXY_RELEASE_LOG(Loading, "close:");
    11131114
    11141115    m_isClosed = true;
     
    11891190        return true;
    11901191
    1191     RELEASE_LOG_IF_ALLOWED(Process, "tryClose:");
     1192    WEBPAGEPROXY_RELEASE_LOG(Process, "tryClose:");
    11921193
    11931194    // Close without delay if the process allows it. Our goal is to terminate
     
    12141215void WebPageProxy::tryCloseTimedOut()
    12151216{
    1216     RELEASE_LOG_ERROR_IF_ALLOWED(Process, "tryCloseTimedOut: Timed out waiting for the process to respond to the WebPage::TryClose IPC, closing the page now");
     1217    WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "tryCloseTimedOut: Timed out waiting for the process to respond to the WebPage::TryClose IPC, closing the page now");
    12171218    closePage();
    12181219}
     
    13111312        return nullptr;
    13121313
    1313     RELEASE_LOG_IF_ALLOWED(Loading, "loadRequest:");
     1314    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadRequest:");
    13141315
    13151316    if (!hasRunningProcess())
     
    13331334    ASSERT(!m_isClosed);
    13341335
    1335     RELEASE_LOG_IF_ALLOWED(Loading, "loadRequestWithNavigationShared:");
     1336    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadRequestWithNavigationShared:");
    13361337
    13371338    auto transaction = m_pageLoadState.transaction();
     
    13691370RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, const String& resourceDirectoryURLString, API::Object* userData)
    13701371{
    1371     RELEASE_LOG_IF_ALLOWED(Loading, "loadFile:");
     1372    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadFile:");
    13721373
    13731374    if (m_isClosed) {
    1374         RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: page is closed");
     1375        WEBPAGEPROXY_RELEASE_LOG(Loading, "loadFile: page is closed");
    13751376        return nullptr;
    13761377    }
     
    13811382    URL fileURL = URL(URL(), fileURLString);
    13821383    if (!fileURL.isLocalFile()) {
    1383         RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: file is not local");
     1384        WEBPAGEPROXY_RELEASE_LOG(Loading, "loadFile: file is not local");
    13841385        return nullptr;
    13851386    }
     
    13911392        resourceDirectoryURL = URL(URL(), resourceDirectoryURLString);
    13921393        if (!resourceDirectoryURL.isLocalFile()) {
    1393             RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: resource URL is not local");
     1394            WEBPAGEPROXY_RELEASE_LOG(Loading, "loadFile: resource URL is not local");
    13941395            return nullptr;
    13951396        }
     
    14251426RefPtr<API::Navigation> WebPageProxy::loadData(const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy)
    14261427{
    1427     RELEASE_LOG_IF_ALLOWED(Loading, "loadData:");
     1428    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadData:");
    14281429
    14291430#if ENABLE(APP_BOUND_DOMAINS)
     
    14331434
    14341435    if (m_isClosed) {
    1435         RELEASE_LOG_IF_ALLOWED(Loading, "loadData: page is closed");
     1436        WEBPAGEPROXY_RELEASE_LOG(Loading, "loadData: page is closed");
    14361437        return nullptr;
    14371438    }
     
    14511452void WebPageProxy::loadDataWithNavigationShared(Ref<WebProcessProxy>&& process, WebCore::PageIdentifier webPageID, API::Navigation& navigation, const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, ShouldTreatAsContinuingLoad shouldTreatAsContinuingLoad, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, std::optional<WebsitePoliciesData>&& websitePolicies, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy)
    14521453{
    1453     RELEASE_LOG_IF_ALLOWED(Loading, "loadDataWithNavigation");
     1454    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadDataWithNavigation");
    14541455
    14551456    ASSERT(!m_isClosed);
     
    14791480RefPtr<API::Navigation> WebPageProxy::loadSimulatedRequest(WebCore::ResourceRequest&& simulatedRequest, WebCore::ResourceResponse&& simulatedResponse, const IPC::DataReference& data)
    14801481{
    1481     RELEASE_LOG_IF_ALLOWED(Loading, "loadSimulatedRequest:");
     1482    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadSimulatedRequest:");
    14821483
    14831484#if ENABLE(APP_BOUND_DOMAINS)
     
    14871488
    14881489    if (m_isClosed) {
    1489         RELEASE_LOG_IF_ALLOWED(Loading, "loadSimulatedRequest: page is closed");
     1490        WEBPAGEPROXY_RELEASE_LOG(Loading, "loadSimulatedRequest: page is closed");
    14901491        return nullptr;
    14911492    }
     
    15331534void WebPageProxy::loadAlternateHTML(const IPC::DataReference& htmlData, const String& encoding, const URL& baseURL, const URL& unreachableURL, API::Object* userData)
    15341535{
    1535     RELEASE_LOG_IF_ALLOWED(Loading, "loadAlternateHTML");
     1536    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadAlternateHTML");
    15361537
    15371538    // When the UIProcess is in the process of handling a failing provisional load, do not attempt to
     
    15391540    // handled properly.
    15401541    if (m_isClosed || m_isLoadingAlternateHTMLStringForFailingProvisionalLoad) {
    1541         RELEASE_LOG_IF_ALLOWED(Loading, "loadAlternateHTML: page is closed (or other)");
     1542        WEBPAGEPROXY_RELEASE_LOG(Loading, "loadAlternateHTML: page is closed (or other)");
    15421543        return;
    15431544    }
     
    15761577void WebPageProxy::loadWebArchiveData(API::Data* webArchiveData, API::Object* userData)
    15771578{
    1578     RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData:");
     1579    WEBPAGEPROXY_RELEASE_LOG(Loading, "loadWebArchiveData:");
    15791580
    15801581    if (m_isClosed) {
    1581         RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData: page is closed");
     1582        WEBPAGEPROXY_RELEASE_LOG(Loading, "loadWebArchiveData: page is closed");
    15821583        return;
    15831584    }
     
    16031604void WebPageProxy::navigateToPDFLinkWithSimulatedClick(const String& urlString, IntPoint documentPoint, IntPoint screenPoint)
    16041605{
    1605     RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick:");
     1606    WEBPAGEPROXY_RELEASE_LOG(Loading, "navigateToPDFLinkWithSimulatedClick:");
    16061607
    16071608    if (m_isClosed) {
    1608         RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is closed:");
     1609        WEBPAGEPROXY_RELEASE_LOG(Loading, "navigateToPDFLinkWithSimulatedClick: page is closed:");
    16091610        return;
    16101611    }
     
    16221623void WebPageProxy::stopLoading()
    16231624{
    1624     RELEASE_LOG_IF_ALLOWED(Loading, "stopLoading:");
     1625    WEBPAGEPROXY_RELEASE_LOG(Loading, "stopLoading:");
    16251626
    16261627    if (!hasRunningProcess()) {
    1627         RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is not valid");
     1628        WEBPAGEPROXY_RELEASE_LOG(Loading, "navigateToPDFLinkWithSimulatedClick: page is not valid");
    16281629        return;
    16291630    }
     
    16391640RefPtr<API::Navigation> WebPageProxy::reload(OptionSet<WebCore::ReloadOption> options)
    16401641{
    1641     RELEASE_LOG_IF_ALLOWED(Loading, "reload:");
     1642    WEBPAGEPROXY_RELEASE_LOG(Loading, "reload:");
    16421643
    16431644    SandboxExtension::Handle sandboxExtensionHandle;
     
    17201721RefPtr<API::Navigation> WebPageProxy::goToBackForwardItem(WebBackForwardListItem& item, FrameLoadType frameLoadType)
    17211722{
    1722     RELEASE_LOG_IF_ALLOWED(Loading, "goToBackForwardItem:");
     1723    WEBPAGEPROXY_RELEASE_LOG(Loading, "goToBackForwardItem:");
    17231724    LOG(Loading, "WebPageProxy %p goToBackForwardItem to item URL %s", this, item.url().utf8().data());
    17241725
    17251726    if (m_isClosed) {
    1726         RELEASE_LOG_IF_ALLOWED(Loading, "goToBackForwardItem: page is closed");
     1727        WEBPAGEPROXY_RELEASE_LOG(Loading, "goToBackForwardItem: page is closed");
    17271728        return nullptr;
    17281729    }
     
    17501751void WebPageProxy::tryRestoreScrollPosition()
    17511752{
    1752     RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition:");
     1753    WEBPAGEPROXY_RELEASE_LOG(Loading, "tryRestoreScrollPosition:");
    17531754
    17541755    if (!hasRunningProcess()) {
    1755         RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition: page is not valid");
     1756        WEBPAGEPROXY_RELEASE_LOG(Loading, "tryRestoreScrollPosition: page is not valid");
    17561757        return;
    17571758    }
     
    20222023            m_activityState.add(ActivityState::IsVisible);
    20232024        if (wasVisible != isNowVisible)
    2024             RELEASE_LOG_IF_ALLOWED(ViewState, "updateActivityState: view visibility state changed %d -> %d", wasVisible, isNowVisible);
     2025            WEBPAGEPROXY_RELEASE_LOG(ViewState, "updateActivityState: view visibility state changed %d -> %d", wasVisible, isNowVisible);
    20252026    }
    20262027    if (flagsToUpdate & ActivityState::IsVisibleOrOccluded && pageClient().isViewVisibleOrOccluded())
     
    21822183}
    21832184
    2184 bool WebPageProxy::isAlwaysOnLoggingAllowed() const
    2185 {
    2186     return sessionID().isAlwaysOnLoggingAllowed();
    2187 }
    2188 
    21892185void WebPageProxy::updateThrottleState()
    21902186{
     
    22052201    if (isViewVisible()) {
    22062202        if (!m_isVisibleActivity || !m_isVisibleActivity->isValid()) {
    2207             RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "updateThrottleState: UIProcess is taking a foreground assertion because the view is visible");
     2203            WEBPAGEPROXY_RELEASE_LOG(ProcessSuspension, "updateThrottleState: UIProcess is taking a foreground assertion because the view is visible");
    22082204            m_isVisibleActivity = m_process->throttler().foregroundActivity("View is visible"_s).moveToUniquePtr();
    22092205        }
    22102206    } else if (m_isVisibleActivity) {
    2211         RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "updateThrottleState: UIProcess is releasing a foreground assertion because the view is no longer visible");
     2207        WEBPAGEPROXY_RELEASE_LOG(ProcessSuspension, "updateThrottleState: UIProcess is releasing a foreground assertion because the view is no longer visible");
    22122208        m_isVisibleActivity = nullptr;
    22132209    }
     
    22162212    if (isAudible) {
    22172213        if (!m_isAudibleActivity || !m_isAudibleActivity->isValid()) {
    2218             RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "updateThrottleState: UIProcess is taking a foreground assertion because we are playing audio");
     2214            WEBPAGEPROXY_RELEASE_LOG(ProcessSuspension, "updateThrottleState: UIProcess is taking a foreground assertion because we are playing audio");
    22192215            m_isAudibleActivity = m_process->throttler().foregroundActivity("View is playing audio"_s).moveToUniquePtr();
    22202216        }
    22212217        m_audibleActivityTimer.stop();
    22222218    } else if (m_isAudibleActivity) {
    2223         RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "updateThrottleState: UIProcess will release a foreground assertion in %g seconds because we are no longer playing audio", audibleActivityClearDelay.seconds());
     2219        WEBPAGEPROXY_RELEASE_LOG(ProcessSuspension, "updateThrottleState: UIProcess will release a foreground assertion in %g seconds because we are no longer playing audio", audibleActivityClearDelay.seconds());
    22242220        if (!m_audibleActivityTimer.isActive())
    22252221            m_audibleActivityTimer.startOneShot(audibleActivityClearDelay);
     
    22292225    if (isCapturingMedia) {
    22302226        if (!m_isCapturingActivity || !m_isCapturingActivity->isValid()) {
    2231             RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "updateThrottleState: UIProcess is taking a foreground assertion because media capture is active");
     2227            WEBPAGEPROXY_RELEASE_LOG(ProcessSuspension, "updateThrottleState: UIProcess is taking a foreground assertion because media capture is active");
    22322228            m_isCapturingActivity = m_process->throttler().foregroundActivity("View is capturing media"_s).moveToUniquePtr();
    22332229        }
    22342230    } else if (m_isCapturingActivity) {
    2235         RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "updateThrottleState: UIProcess is releasing a foreground assertion because media capture is no longer active");
     2231        WEBPAGEPROXY_RELEASE_LOG(ProcessSuspension, "updateThrottleState: UIProcess is releasing a foreground assertion because media capture is no longer active");
    22362232        m_isCapturingActivity = nullptr;
    22372233    }
     
    22422238void WebPageProxy::clearAudibleActivity()
    22432239{
    2244     RELEASE_LOG_IF_ALLOWED(ProcessSuspension, "updateThrottleState: UIProcess is releasing a foreground assertion because we are no longer playing audio");
     2240    WEBPAGEPROXY_RELEASE_LOG(ProcessSuspension, "updateThrottleState: UIProcess is releasing a foreground assertion because we are no longer playing audio");
    22452241    m_isAudibleActivity = nullptr;
    22462242}
     
    25252521{
    25262522    ASSERT(m_hasUpdatedRenderingAfterDidCommitLoad);
    2527     RELEASE_LOG_IF_ALLOWED(Process, "stopMakingViewBlankDueToLackOfRenderingUpdate:");
     2523    WEBPAGEPROXY_RELEASE_LOG(Process, "stopMakingViewBlankDueToLackOfRenderingUpdate:");
    25282524    pageClient().makeViewBlank(false);
    25292525}
     
    25412537#endif
    25422538        if (shouldMakeViewBlank) {
    2543             RELEASE_LOG_IF_ALLOWED(Process, "makeViewBlankIfUnpaintedSinceLastLoadCommit: Making the view blank because of a JS prompt before the first paint for its page");
     2539            WEBPAGEPROXY_RELEASE_LOG(Process, "makeViewBlankIfUnpaintedSinceLastLoadCommit: Making the view blank because of a JS prompt before the first paint for its page");
    25442540            pageClient().makeViewBlank(true);
    25452541        }
     
    33553351void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, API::Navigation* navigation, Ref<API::NavigationAction>&& navigationAction, ProcessSwapRequestedByClient processSwapRequestedByClient, WebFrameProxy& frame, RefPtr<API::WebsitePolicies>&& policies, Ref<PolicyDecisionSender>&& sender)
    33563352{
    3357     RELEASE_LOG_IF_ALLOWED(Loading, "receivedNavigationPolicyDecision: frameID=%llu, navigationID=%llu, policyAction=%u", frame.frameID().toUInt64(), navigation ? navigation->navigationID() : 0, (unsigned)policyAction);
     3353    WEBPAGEPROXY_RELEASE_LOG(Loading, "receivedNavigationPolicyDecision: frameID=%llu, navigationID=%llu, policyAction=%u", frame.frameID().toUInt64(), navigation ? navigation->navigationID() : 0, (unsigned)policyAction);
    33583354
    33593355    Ref<WebsiteDataStore> websiteDataStore = m_websiteDataStore.copyRef();
     
    34173413        if (shouldProcessSwap) {
    34183414            policyAction = PolicyAction::StopAllLoads;
    3419             RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "decidePolicyForNavigationAction, swapping process %i with process %i for navigation, reason=%" PUBLIC_LOG_STRING, processIdentifier(), processForNavigation->processIdentifier(), reason.utf8().data());
     3415            WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "decidePolicyForNavigationAction, swapping process %i with process %i for navigation, reason=%" PUBLIC_LOG_STRING, processIdentifier(), processForNavigation->processIdentifier(), reason.utf8().data());
    34203416            LOG(ProcessSwapping, "(ProcessSwapping) Switching from process %i to new process (%i) for navigation %" PRIu64 " '%s'", processIdentifier(), processForNavigation->processIdentifier(), navigation->navigationID(), navigation->loggingString());
    34213417        } else
    3422             RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "decidePolicyForNavigationAction: keep using process %i for navigation, reason=%" PUBLIC_LOG_STRING, processIdentifier(), reason.utf8().data());
     3418            WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "decidePolicyForNavigationAction: keep using process %i for navigation, reason=%" PUBLIC_LOG_STRING, processIdentifier(), reason.utf8().data());
    34233419
    34243420        std::optional<SandboxExtension::Handle> optionalHandle;
     
    34993495{
    35003496    ASSERT(m_provisionalPage);
    3501     RELEASE_LOG_IF_ALLOWED(Loading, "commitProvisionalPage: newPID=%i", m_provisionalPage->process().processIdentifier());
     3497    WEBPAGEPROXY_RELEASE_LOG(Loading, "commitProvisionalPage: newPID=%i", m_provisionalPage->process().processIdentifier());
    35023498
    35033499    std::optional<FrameIdentifier> mainFrameIDInPreviousProcess = m_mainFrame ? std::make_optional(m_mainFrame->frameID()) : std::nullopt;
     
    35373533void WebPageProxy::continueNavigationInNewProcess(API::Navigation& navigation, std::unique_ptr<SuspendedPageProxy>&& suspendedPage, Ref<WebProcessProxy>&& newProcess, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<API::WebsitePolicies>&& websitePolicies)
    35383534{
    3539     RELEASE_LOG_IF_ALLOWED(Loading, "continueNavigationInNewProcess: newProcessPID=%i, hasSuspendedPage=%i", newProcess->processIdentifier(), !!suspendedPage);
     3535    WEBPAGEPROXY_RELEASE_LOG(Loading, "continueNavigationInNewProcess: newProcessPID=%i, hasSuspendedPage=%i", newProcess->processIdentifier(), !!suspendedPage);
    35403536    LOG(Loading, "Continuing navigation %" PRIu64 " '%s' in a new web process", navigation.navigationID(), navigation.loggingString());
    35413537    RELEASE_ASSERT(!newProcess->isInProcessCache());
    35423538
    35433539    if (m_provisionalPage) {
    3544         RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "continueNavigationInNewProcess: There is already a pending provisional load, cancelling it (provisonalNavigationID=%llu, navigationID=%llu)", m_provisionalPage->navigationID(), navigation.navigationID());
     3540        WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "continueNavigationInNewProcess: There is already a pending provisional load, cancelling it (provisonalNavigationID=%llu, navigationID=%llu)", m_provisionalPage->navigationID(), navigation.navigationID());
    35453541        if (m_provisionalPage->navigationID() != navigation.navigationID())
    35463542            m_provisionalPage->cancel();
     
    36753671void WebPageProxy::suspend(CompletionHandler<void(bool)>&& completionHandler)
    36763672{
    3677     RELEASE_LOG_IF_ALLOWED(Loading, "suspend:");
     3673    WEBPAGEPROXY_RELEASE_LOG(Loading, "suspend:");
    36783674    if (!hasRunningProcess() || m_isSuspended)
    36793675        return completionHandler(false);
     
    36853681void WebPageProxy::resume(CompletionHandler<void(bool)>&& completionHandler)
    36863682{
    3687     RELEASE_LOG_IF_ALLOWED(Loading, "resume:");
     3683    WEBPAGEPROXY_RELEASE_LOG(Loading, "resume:");
    36883684
    36893685    if (!hasRunningProcess() || !m_isSuspended)
     
    37313727RefPtr<API::Navigation> WebPageProxy::restoreFromSessionState(SessionState sessionState, bool navigate)
    37323728{
    3733     RELEASE_LOG_IF_ALLOWED(Loading, "restoreFromSessionState:");
     3729    WEBPAGEPROXY_RELEASE_LOG(Loading, "restoreFromSessionState:");
    37343730
    37353731    m_sessionRestorationRenderTreeSize = 0;
     
    45494545
    45504546    LOG(Loading, "WebPageProxy %" PRIu64 " in process pid %i didStartProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", m_identifier.toUInt64(), process->processIdentifier(), frameID.toUInt64(), navigationID, url.string().utf8().data());
    4551     RELEASE_LOG_IF_ALLOWED(Loading, "didStartProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     4547    WEBPAGEPROXY_RELEASE_LOG(Loading, "didStartProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    45524548
    45534549    auto transaction = m_pageLoadState.transaction();
     
    45864582
    45874583    if (!checkURLReceivedFromCurrentOrPreviousWebProcess(m_process, url)) {
    4588         RELEASE_LOG_ERROR_IF_ALLOWED(Process, "Ignoring WebPageProxy::DidExplicitOpenForFrame() IPC from the WebContent process because the file URL is outside the sandbox");
     4584        WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "Ignoring WebPageProxy::DidExplicitOpenForFrame() IPC from the WebContent process because the file URL is outside the sandbox");
    45894585        return;
    45904586    }
     
    46114607{
    46124608    LOG(Loading, "WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", frameID.toUInt64(), navigationID, request.url().string().utf8().data());
    4613     RELEASE_LOG_IF_ALLOWED(Loading, "didReceiveServerRedirectForProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     4609    WEBPAGEPROXY_RELEASE_LOG(Loading, "didReceiveServerRedirectForProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    46144610
    46154611    PageClientProtector protector(pageClient());
     
    46404636void WebPageProxy::willPerformClientRedirectForFrame(FrameIdentifier frameID, const String& url, double delay, WebCore::LockBackForwardList)
    46414637{
    4642     RELEASE_LOG_IF_ALLOWED(Loading, "willPerformClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64());
     4638    WEBPAGEPROXY_RELEASE_LOG(Loading, "willPerformClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64());
    46434639
    46444640    PageClientProtector protector(pageClient());
     
    46534649void WebPageProxy::didCancelClientRedirectForFrame(FrameIdentifier frameID)
    46544650{
    4655     RELEASE_LOG_IF_ALLOWED(Loading, "didCancelClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64());
     4651    WEBPAGEPROXY_RELEASE_LOG(Loading, "didCancelClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64());
    46564652
    46574653    PageClientProtector protector(pageClient());
     
    47014697{
    47024698    LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " in web process pid %i didFailProvisionalLoadForFrame to provisionalURL %s", m_identifier.toUInt64(), process->processIdentifier(), provisionalURL.utf8().data());
    4703     RELEASE_LOG_ERROR_IF_ALLOWED(Process, "didFailProvisionalLoadForFrame: frameID=%" PRIu64 ", domain=%s, code=%d", frameID.toUInt64(), error.domain().utf8().data(), error.errorCode());
     4699    WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "didFailProvisionalLoadForFrame: frameID=%" PRIu64 ", domain=%s, code=%d", frameID.toUInt64(), error.domain().utf8().data(), error.errorCode());
    47044700
    47054701    PageClientProtector protector(pageClient());
     
    47724768    LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " didCommitLoadForFrame in navigation %" PRIu64, m_identifier.toUInt64(), navigationID);
    47734769    LOG(BackForward, "(Back/Forward) After load commit, back/forward list is now:%s", m_backForwardList->loggingString());
    4774     RELEASE_LOG_IF_ALLOWED(Loading, "didCommitLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     4770    WEBPAGEPROXY_RELEASE_LOG(Loading, "didCommitLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    47754771
    47764772    PageClientProtector protector(pageClient());
     
    48964892void WebPageProxy::didFinishDocumentLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, const UserData& userData)
    48974893{
    4898     RELEASE_LOG_IF_ALLOWED(Loading, "didFinishDocumentLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     4894    WEBPAGEPROXY_RELEASE_LOG(Loading, "didFinishDocumentLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    48994895
    49004896    PageClientProtector protector(pageClient());
     
    49244920{
    49254921    LOG(Loading, "WebPageProxy::didFinishLoadForFrame - WebPageProxy %p with navigationID %" PRIu64 " didFinishLoad", this, navigationID);
    4926     RELEASE_LOG_IF_ALLOWED(Loading, "didFinishLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
     4922    WEBPAGEPROXY_RELEASE_LOG(Loading, "didFinishLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());
    49274923
    49284924    PageClientProtector protector(pageClient());
     
    49754971void WebPageProxy::didFailLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, const ResourceError& error, const UserData& userData)
    49764972{
    4977     RELEASE_LOG_ERROR_IF_ALLOWED(Loading, "didFailLoadForFrame: frameID=%" PRIu64 ", domain=%s, code=%d", frameID.toUInt64(), error.domain().utf8().data(), error.errorCode());
     4973    WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "didFailLoadForFrame: frameID=%" PRIu64 ", domain=%s, code=%d", frameID.toUInt64(), error.domain().utf8().data(), error.errorCode());
    49784974
    49794975    PageClientProtector protector(pageClient());
     
    50205016void WebPageProxy::didSameDocumentNavigationForFrame(FrameIdentifier frameID, uint64_t navigationID, uint32_t opaqueSameDocumentNavigationType, URL&& url, const UserData& userData)
    50215017{
    5022     RELEASE_LOG_IF_ALLOWED(Loading, "didSameDocumentNavigationForFrame: frameID=%" PRIu64, frameID.toUInt64());
     5018    WEBPAGEPROXY_RELEASE_LOG(Loading, "didSameDocumentNavigationForFrame: frameID=%" PRIu64, frameID.toUInt64());
    50235019
    50245020    PageClientProtector protector(pageClient());
     
    52065202    IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, Ref<PolicyDecisionSender>&& sender)
    52075203{
    5208     RELEASE_LOG_IF_ALLOWED(Loading, "decidePolicyForNavigationAction: frameID=%llu, navigationID=%llu", frame.frameID().toUInt64(), navigationID);
     5204    WEBPAGEPROXY_RELEASE_LOG(Loading, "decidePolicyForNavigationAction: frameID=%llu, navigationID=%llu", frame.frameID().toUInt64(), navigationID);
    52095205
    52105206    LOG(Loading, "WebPageProxy::decidePolicyForNavigationAction - Original URL %s, current target URL %s", originalRequest.url().string().utf8().data(), request.url().string().utf8().data());
     
    52225218
    52235219    if (!checkURLReceivedFromCurrentOrPreviousWebProcess(process, request.url())) {
    5224         RELEASE_LOG_ERROR_IF_ALLOWED(Process, "Ignoring request to load this main resource because it is outside the sandbox");
     5220        WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "Ignoring request to load this main resource because it is outside the sandbox");
    52255221        sender->send(PolicyDecision { sender->identifier(), isNavigatingToAppBoundDomain(), PolicyAction::Ignore, 0, std::nullopt, std::nullopt });
    52265222        return;
     
    52885284#if ENABLE(CONTENT_FILTERING)
    52895285    if (frame.didHandleContentFilterUnblockNavigation(request)) {
    5290         RELEASE_LOG_ERROR_IF_ALLOWED(Process, "Ignoring request to load this main resource because it was handled by content filter");
     5286        WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "Ignoring request to load this main resource because it was handled by content filter");
    52915287        return receivedPolicyDecision(PolicyAction::Ignore, m_navigationState->navigation(navigationID), nullptr, WTFMove(navigationAction), WTFMove(sender));
    52925288    }
     
    53035299
    53045300    auto listener = makeRef(frame.setUpPolicyListenerProxy([this, protectedThis = makeRef(*this), frame = makeRef(frame), sender = WTFMove(sender), navigation, navigationAction, frameInfo, userDataObject = process->transformHandlesToObjects(userData.object()).get()] (PolicyAction policyAction, API::WebsitePolicies* policies, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<SafeBrowsingWarning>&& safeBrowsingWarning, std::optional<NavigatingToAppBoundDomain> isAppBoundDomain) mutable {
    5305         RELEASE_LOG_IF_ALLOWED(Loading, "decidePolicyForNavigationAction: listener called: frameID=%llu, navigationID=%llu, policyAction=%u, safeBrowsingWarning=%d, isAppBoundDomain=%d", frame->frameID().toUInt64(), navigation ? navigation->navigationID() : 0, (unsigned)policyAction, !!safeBrowsingWarning, !!isAppBoundDomain);
     5301        WEBPAGEPROXY_RELEASE_LOG(Loading, "decidePolicyForNavigationAction: listener called: frameID=%llu, navigationID=%llu, policyAction=%u, safeBrowsingWarning=%d, isAppBoundDomain=%d", frame->frameID().toUInt64(), navigation ? navigation->navigationID() : 0, (unsigned)policyAction, !!safeBrowsingWarning, !!isAppBoundDomain);
    53065302
    53075303        auto completionHandler = [this, protectedThis, frame, sender = WTFMove(sender), navigation, navigationAction = WTFMove(navigationAction), processSwapRequestedByClient, policies = makeRefPtr(policies)] (PolicyAction policyAction) mutable {
     
    53225318                auto error = errorForUnpermittedAppBoundDomainNavigation(navigation->currentRequest().url());
    53235319                m_navigationClient->didFailProvisionalNavigationWithError(*this, FrameInfoData { frameInfo }, navigation.get(), error, userDataObject);
    5324                 RELEASE_LOG_ERROR_IF_ALLOWED(Loading, "Ignoring request to load this main resource because it is attempting to navigate away from an app-bound domain or navigate after using restricted APIs");
     5320                WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "Ignoring request to load this main resource because it is attempting to navigate away from an app-bound domain or navigate after using restricted APIs");
    53255321                completionHandler(PolicyAction::Ignore);
    53265322                return;
     
    55985594void WebPageProxy::didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&& process, const WebNavigationDataStore& store, FrameIdentifier frameID)
    55995595{
    5600     RELEASE_LOG_IF_ALLOWED(Loading, "didNavigateWithNavigationDataShared:");
     5596    WEBPAGEPROXY_RELEASE_LOG(Loading, "didNavigateWithNavigationDataShared:");
    56015597
    56025598    PageClientProtector protector(pageClient());
     
    56185614void WebPageProxy::didPerformClientRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID)
    56195615{
    5620     RELEASE_LOG_IF_ALLOWED(Loading, "didPerformClientRedirectShared: frameID=%" PRIu64, frameID.toUInt64());
     5616    WEBPAGEPROXY_RELEASE_LOG(Loading, "didPerformClientRedirectShared: frameID=%" PRIu64, frameID.toUInt64());
    56215617
    56225618    PageClientProtector protector(pageClient());
     
    56455641void WebPageProxy::didPerformServerRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID)
    56465642{
    5647     RELEASE_LOG_IF_ALLOWED(Loading, "didPerformServerRedirect:");
     5643    WEBPAGEPROXY_RELEASE_LOG(Loading, "didPerformServerRedirect:");
    56485644
    56495645    PageClientProtector protector(pageClient());
     
    57755771        return;
    57765772
    5777     RELEASE_LOG_IF_ALLOWED(Process, "closePage:");
     5773    WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:");
    57785774    pageClient().clearAllEditCommands();
    57795775    m_uiClient->close(this);
     
    74967492void WebPageProxy::processDidBecomeUnresponsive()
    74977493{
    7498     RELEASE_LOG_ERROR_IF_ALLOWED(Process, "processDidBecomeUnresponsive:");
     7494    WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "processDidBecomeUnresponsive:");
    74997495
    75007496    if (!hasRunningProcess())
     
    75087504void WebPageProxy::processDidBecomeResponsive()
    75097505{
    7510     RELEASE_LOG_IF_ALLOWED(Process, "processDidBecomeResponsive:");
     7506    WEBPAGEPROXY_RELEASE_LOG(Process, "processDidBecomeResponsive:");
    75117507
    75127508    if (!hasRunningProcess())
     
    75497545{
    75507546    if (reason != ProcessTerminationReason::NavigationSwap)
    7551         RELEASE_LOG_ERROR_IF_ALLOWED(Process, "processDidTerminate: (pid %d), reason %d", processIdentifier(), reason);
     7547        WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "processDidTerminate: (pid %d), reason %d", processIdentifier(), reason);
    75527548
    75537549    ASSERT(m_hasRunningProcess);
     
    76037599void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason)
    76047600{
    7605     RELEASE_LOG_ERROR_IF_ALLOWED(Loading, "dispatchProcessDidTerminate: reason=%d", reason);
     7601    WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%d", reason);
    76067602
    76077603    bool handledByClient = false;
     
    76207616
    76217617    if (++m_recentCrashCount > maximumWebProcessRelaunchAttempts) {
    7622         RELEASE_LOG_ERROR_IF_ALLOWED(Process, "tryReloadAfterProcessTermination: process crashed and the client did not handle it, not reloading the page because we reached the maximum number of attempts");
     7618        WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "tryReloadAfterProcessTermination: process crashed and the client did not handle it, not reloading the page because we reached the maximum number of attempts");
    76237619        m_recentCrashCount = 0;
    76247620        return;
    76257621    }
    7626     RELEASE_LOG_IF_ALLOWED(Process, "tryReloadAfterProcessTermination: process crashed and the client did not handle it, reloading the page");
     7622    WEBPAGEPROXY_RELEASE_LOG(Process, "tryReloadAfterProcessTermination: process crashed and the client did not handle it, reloading the page");
    76277623    reload(ReloadOption::ExpiredOnly);
    76287624}
     
    82718267void WebPageProxy::requestStorageSpace(FrameIdentifier frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&& completionHandler)
    82728268{
    8273     RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace for frame %" PRIu64 ", current quota %" PRIu64 " current usage %" PRIu64 " expected usage %" PRIu64, frameID.toUInt64(), currentQuota, currentDatabaseUsage, expectedUsage);
     8269    WEBPAGEPROXY_RELEASE_LOG(Storage, "requestStorageSpace for frame %" PRIu64 ", current quota %" PRIu64 " current usage %" PRIu64 " expected usage %" PRIu64, frameID.toUInt64(), currentQuota, currentDatabaseUsage, expectedUsage);
    82748270
    82758271    StorageRequests::singleton().processOrAppend([this, protectedThis = makeRef(*this), pageURL = currentURL(), frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, completionHandler = WTFMove(completionHandler)]() mutable {
    82768272        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 {
    82778273
    8278             RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace response for frame %" PRIu64 ", quota %" PRIu64, frameID.toUInt64(), quota);
     8274            WEBPAGEPROXY_RELEASE_LOG(Storage, "requestStorageSpace response for frame %" PRIu64 ", quota %" PRIu64, frameID.toUInt64(), quota);
    82798275            UNUSED_VARIABLE(frameID);
    82808276
    82818277            if (quota <= currentQuota && this->currentURL() == pageURL) {
    8282                 RELEASE_LOG_IF_ALLOWED(Storage, "storage space increase denied");
     8278                WEBPAGEPROXY_RELEASE_LOG(Storage, "storage space increase denied");
    82838279                m_isQuotaIncreaseDenied =  true;
    82848280            }
     
    93699365        m_updateReportedMediaCaptureStateTimer.startOneShot(m_mediaCaptureReportingDelay);
    93709366
    9371     RELEASE_LOG_IF_ALLOWED(WebRTC, "updateReportedMediaCaptureState: from %d to %d", m_reportedMediaCaptureState.toRaw(), activeCaptureState.toRaw());
     9367    WEBPAGEPROXY_RELEASE_LOG(WebRTC, "updateReportedMediaCaptureState: from %d to %d", m_reportedMediaCaptureState.toRaw(), activeCaptureState.toRaw());
    93729368
    93739369    bool microphoneCaptureChanged = (m_reportedMediaCaptureState & MediaProducer::AudioCaptureMask) != (activeCaptureState & MediaProducer::AudioCaptureMask);
     
    96089604void WebPageProxy::didExceedInactiveMemoryLimitWhileActive()
    96099605{
    9610     RELEASE_LOG_ERROR_IF_ALLOWED(PerformanceLogging, "didExceedInactiveMemoryLimitWhileActive");
     9606    WEBPAGEPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedInactiveMemoryLimitWhileActive");
    96119607    m_uiClient->didExceedBackgroundResourceLimitWhileInForeground(*this, kWKResourceLimitMemory);
    96129608}
     
    96149610void WebPageProxy::didExceedBackgroundCPULimitWhileInForeground()
    96159611{
    9616     RELEASE_LOG_ERROR_IF_ALLOWED(PerformanceLogging, "didExceedBackgroundCPULimitWhileInForeground");
     9612    WEBPAGEPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedBackgroundCPULimitWhileInForeground");
    96179613    m_uiClient->didExceedBackgroundResourceLimitWhileInForeground(*this, kWKResourceLimitCPU);
    96189614}
     
    1042210418    if (!m_logger) {
    1042310419        m_logger = Logger::create(this);
    10424         m_logger->setEnabled(this, isAlwaysOnLoggingAllowed());
     10420        // FIXME: Does this really need to be disabled in ephemeral sessions?
     10421        m_logger->setEnabled(this, !sessionID().isEphemeral());
    1042510422    }
    1042610423
     
    1068110678} // namespace WebKit
    1068210679
    10683 #undef RELEASE_LOG_IF_ALLOWED
     10680#undef WEBPAGEPROXY_RELEASE_LOG
     10681#undef WEBPAGEPROXY_RELEASE_LOG_ERROR
    1068410682#undef MESSAGE_CHECK_COMPLETION
    1068510683#undef MESSAGE_CHECK_URL
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r278253 r278315  
    15911591    void setShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, bool) final;
    15921592    void playbackTargetPickerWasDismissed(WebCore::PlaybackTargetClientContextIdentifier) final;
    1593     bool alwaysOnLoggingAllowed() const final { return isAlwaysOnLoggingAllowed(); }
     1593    bool alwaysOnLoggingAllowed() const final { return sessionID().isAlwaysOnLoggingAllowed(); }
    15941594    bool useiTunesAVOutputContext() const final;
    15951595    PlatformView* platformView() const final;
     
    16241624    bool isNeverRichlyEditableForTouchBar() const { return m_isNeverRichlyEditableForTouchBar; }
    16251625#endif
    1626 
    1627     bool isAlwaysOnLoggingAllowed() const;
    16281626
    16291627#if ENABLE(GAMEPAD)
  • trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r278253 r278315  
    8282#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process().connection())
    8383
    84 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - [pageProxyID=%llu, webPageID=%llu, PID=%i] WebPageProxy::" fmt, this, m_identifier.toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), ##__VA_ARGS__)
     84#define WEBPAGEPROXY_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - [pageProxyID=%llu, webPageID=%llu, PID=%i] WebPageProxy::" fmt, this, m_identifier.toUInt64(), m_webPageID.toUInt64(), m_process->processIdentifier(), ##__VA_ARGS__)
    8585
    8686namespace WebKit {
     
    590590    bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock];
    591591   
    592     RELEASE_LOG_IF_ALLOWED(ViewState, "applicationDidEnterBackground: isSuspendedUnderLock? %d", isSuspendedUnderLock);
     592    WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationDidEnterBackground: isSuspendedUnderLock? %d", isSuspendedUnderLock);
    593593
    594594#if !PLATFORM(WATCHOS)
     
    620620
    621621    bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock];
    622     RELEASE_LOG_IF_ALLOWED(ViewState, "applicationWillEnterForeground: isSuspendedUnderLock? %d", isSuspendedUnderLock);
     622    WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationWillEnterForeground: isSuspendedUnderLock? %d", isSuspendedUnderLock);
    623623
    624624    m_process->send(Messages::WebPage::ApplicationWillEnterForeground(isSuspendedUnderLock), m_webPageID);
     
    634634{
    635635    bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock];
    636     RELEASE_LOG_IF_ALLOWED(ViewState, "applicationWillEnterForegroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);
     636    WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationWillEnterForegroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);
    637637
    638638    m_process->send(Messages::WebPage::ApplicationDidEnterBackgroundForMedia(isSuspendedUnderLock), m_webPageID);
     
    642642{
    643643    bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock];
    644     RELEASE_LOG_IF_ALLOWED(ViewState, "applicationDidEnterBackgroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);
     644    WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationDidEnterBackgroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);
    645645
    646646    m_process->send(Messages::WebPage::ApplicationWillEnterForegroundForMedia(isSuspendedUnderLock), m_webPageID);
     
    14671467
    14681468    bool canTakeForegroundAssertions = pageClient().canTakeForegroundAssertions();
    1469     RELEASE_LOG_IF_ALLOWED(Process, "WebPageProxy::shouldForceForegroundPriorityForClientNavigation() returns %d based on PageClient::canTakeForegroundAssertions()", canTakeForegroundAssertions);
     1469    WEBPAGEPROXY_RELEASE_LOG(Process, "WebPageProxy::shouldForceForegroundPriorityForClientNavigation() returns %d based on PageClient::canTakeForegroundAssertions()", canTakeForegroundAssertions);
    14701470    return canTakeForegroundAssertions;
    14711471}
     
    15791579} // namespace WebKit
    15801580
    1581 #undef RELEASE_LOG_IF_ALLOWED
     1581#undef WEBPAGEPROXY_RELEASE_LOG
    15821582#undef MESSAGE_CHECK
    15831583
Note: See TracChangeset for help on using the changeset viewer.