Changeset 278315 in webkit
- Timestamp:
- Jun 1, 2021, 11:14:29 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 10 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/API/ios/WKWebViewIOS.mm (modified) (22 diffs)
-
UIProcess/Cocoa/LegacyDownloadClient.mm (modified) (2 diffs)
-
UIProcess/Cocoa/NavigationState.mm (modified) (3 diffs)
-
UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm (modified) (17 diffs)
-
UIProcess/ProvisionalPageProxy.cpp (modified) (13 diffs)
-
UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm (modified) (1 diff)
-
UIProcess/WebPageProxy.cpp (modified) (78 diffs)
-
UIProcess/WebPageProxy.h (modified) (2 diffs)
-
UIProcess/ios/WebPageProxyIOS.mm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r278308 r278315 1 2021-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 1 99 2021-06-01 Per Arne <pvollan@apple.com> 2 100 -
trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
r278253 r278315 79 79 } 80 80 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__) 82 82 83 83 static const Seconds delayBeforeNoVisibleContentsRectsLogging = 1_s; … … 687 687 - (void)_processWillSwap 688 688 { 689 RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _processWillSwap]", self);689 WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _processWillSwap]", self); 690 690 [self _processWillSwapOrDidExit]; 691 691 } … … 693 693 - (void)_processDidExit 694 694 { 695 RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _processDidExit]", self);695 WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _processDidExit]", self); 696 696 697 697 [self _processWillSwapOrDidExit]; … … 705 705 - (void)_didRelaunchProcess 706 706 { 707 RELEASE_LOG_IF_ALLOWED("%p -[WKWebView _didRelaunchProcess]", self);707 WKWEBVIEW_RELEASE_LOG("%p -[WKWebView _didRelaunchProcess]", self); 708 708 _hasScheduledVisibleRectUpdate = NO; 709 709 _viewStabilityWhenVisibleContentRectUpdateScheduled = { }; … … 788 788 { 789 789 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)", 791 791 self, _page->identifier().toUInt64(), layerTreeTransaction.transactionID().toUInt64(), _dynamicViewportUpdateMode, _needsResetViewStateAfterCommitLoadForMainFrame, _firstPaintAfterCommitLoadTransactionID.toUInt64(), [_contentView sizeChangedSinceLastVisibleContentRectUpdate], [_scrollView isZoomBouncing], _currentlyAdjustingScrollViewInsetsForKeyboard); 792 792 } … … 795 795 auto timeSinceFirstRequestWithPendingCommit = MonotonicTime::now() - *_timeOfFirstVisibleContentRectUpdateWithPendingCommit; 796 796 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()); 798 798 _timeOfFirstVisibleContentRectUpdateWithPendingCommit = std::nullopt; 799 799 } … … 895 895 896 896 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); 898 898 899 899 [self _updateScrollViewForTransaction:layerTreeTransaction]; … … 1965 1965 WKWebView *webView = retainedSelf.get(); 1966 1966 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); 1968 1968 return; 1969 1969 } … … 1972 1972 [webView _updateVisibleContentRects]; 1973 1973 } @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); 1975 1975 } 1976 1976 webView->_hasScheduledVisibleRectUpdate = NO; … … 1985 1985 auto timeNow = MonotonicTime::now(); 1986 1986 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", 1988 1988 self, (timeNow - _timeOfRequestForVisibleContentRectUpdate).value(), (timeNow - _timeOfLastVisibleContentRectUpdate).value(), [self _isValid]); 1989 1989 } … … 2080 2080 [_customContentView web_computedContentInsetDidChange]; 2081 2081 _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()); 2083 2083 return; 2084 2084 } … … 2088 2088 auto timeSinceFirstRequestWithPendingCommit = timeNow - *_timeOfFirstVisibleContentRectUpdateWithPendingCommit; 2089 2089 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()); 2091 2091 } 2092 2092 … … 2094 2094 _didDeferUpdateVisibleContentRectsForUIScrollViewDelegateCallback = YES; 2095 2095 _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()); 2097 2097 return; 2098 2098 } … … 2107 2107 _didDeferUpdateVisibleContentRectsForAnyReason = YES; 2108 2108 _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)", 2110 2110 self, _page->identifier().toUInt64(), _dynamicViewportUpdateMode, _needsResetViewStateAfterCommitLoadForMainFrame, [_contentView sizeChangedSinceLastVisibleContentRectUpdate], [_scrollView isZoomBouncing], _currentlyAdjustingScrollViewInsetsForKeyboard); 2111 2111 return; … … 2113 2113 2114 2114 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()); 2116 2116 2117 2117 _didDeferUpdateVisibleContentRectsForUIScrollViewDelegateCallback = NO; … … 2167 2167 2168 2168 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()); 2170 2170 2171 2171 _alwaysSendNextVisibleContentRectUpdate = NO; … … 2193 2193 - (void)_cancelAnimatedResize 2194 2194 { 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); 2196 2196 2197 2197 if (_dynamicViewportUpdateMode == WebKit::DynamicViewportUpdateMode::NotResizing) … … 2225 2225 if (!_resizeAnimationView) { 2226 2226 // 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); 2228 2228 [self _cancelAnimatedResize]; 2229 2229 return; 2230 2230 } 2231 2231 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()); 2233 2233 2234 2234 NSUInteger indexOfResizeAnimationView = [[_scrollView subviews] indexOfObject:_resizeAnimationView.get()]; … … 2901 2901 } 2902 2902 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()); 2904 2904 2905 2905 _dynamicViewportUpdateMode = WebKit::DynamicViewportUpdateMode::ResizingWithAnimation; … … 3038 3038 - (void)_endAnimatedResize 3039 3039 { 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); 3041 3041 3042 3042 // If we already have an up-to-date layer tree, immediately complete … … 3049 3049 - (void)_resizeWhileHidingContentWithUpdates:(void (^)(void))updateBlock 3050 3050 { 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()); 3052 3052 3053 3053 [self _beginAnimatedResizeWithUpdates:updateBlock]; … … 3353 3353 @end 3354 3354 3355 #undef WKWEBVIEW_RELEASE_LOG 3356 3355 3357 #endif // PLATFORM(IOS_FAMILY) -
trunk/Source/WebKit/UIProcess/Cocoa/LegacyDownloadClient.mm
r270638 r278315 283 283 #if PLATFORM(IOS_FAMILY) 284 284 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); 286 286 ASSERT(!m_activity); 287 287 m_activity = webPage->process().throttler().backgroundActivity("System preview download"_s).moveToUniquePtr(); … … 296 296 #if PLATFORM(IOS_FAMILY) 297 297 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); 299 299 m_activity = nullptr; 300 300 } -
trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm
r277740 r278315 1369 1369 switch (reason) { 1370 1370 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); 1372 1372 break; 1373 1373 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); 1375 1375 break; 1376 1376 } … … 1389 1389 1390 1390 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); 1392 1392 m_releaseNetworkActivityTimer.stop(); 1393 1393 } 1394 1394 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); 1396 1396 m_networkActivity = m_webView->_page->process().throttler().backgroundActivity("Page Load"_s).moveToUniquePtr(); 1397 1397 } … … 1399 1399 // The application is visible so we delay releasing the background activity for 3 seconds to give it a chance to start another navigation 1400 1400 // 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); 1402 1402 m_releaseNetworkActivityTimer.startOneShot(3_s); 1403 1403 } -
trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm
r276621 r278315 45 45 #import <wtf/Vector.h> 46 46 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__) 48 48 49 49 namespace WebKit { … … 118 118 void SOAuthorizationSession::shouldStart() 119 119 { 120 RELEASE_LOG_IF_ALLOWED("shouldStart:");120 AUTHORIZATIONSESSION_RELEASE_LOG("shouldStart:"); 121 121 122 122 ASSERT(m_state == State::Idle); … … 128 128 void SOAuthorizationSession::start() 129 129 { 130 RELEASE_LOG_IF_ALLOWED("start:");130 AUTHORIZATIONSESSION_RELEASE_LOG("start:"); 131 131 132 132 ASSERT((m_state == State::Idle || m_state == State::Waiting) && m_navigationAction); 133 133 m_state = State::Active; 134 134 [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); 136 136 137 137 if (!weakThis || error || !authorizationHints) … … 143 143 void SOAuthorizationSession::continueStartAfterGetAuthorizationHints(const String& hints) 144 144 { 145 RELEASE_LOG_IF_ALLOWED("continueStartAfterGetAuthorizationHints: (hints=%s)", hints.utf8().data());145 AUTHORIZATIONSESSION_RELEASE_LOG("continueStartAfterGetAuthorizationHints: (hints=%s)", hints.utf8().data()); 146 146 147 147 ASSERT(m_state == State::Active); … … 159 159 { 160 160 if (policy == SOAuthorizationLoadPolicy::Ignore) { 161 RELEASE_LOG_IF_ALLOWED("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Ignore");161 AUTHORIZATIONSESSION_RELEASE_LOG("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Ignore"); 162 162 163 163 fallBackToWebPath(); … … 165 165 } 166 166 167 RELEASE_LOG_IF_ALLOWED("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Allow");167 AUTHORIZATIONSESSION_RELEASE_LOG("continueStartAfterDecidePolicy: Receive SOAuthorizationLoadPolicy::Allow"); 168 168 169 169 if (!m_soAuthorization || !m_page || !m_navigationAction) … … 193 193 void SOAuthorizationSession::fallBackToWebPath() 194 194 { 195 RELEASE_LOG_IF_ALLOWED("fallBackToWebPath:");195 AUTHORIZATIONSESSION_RELEASE_LOG("fallBackToWebPath:"); 196 196 197 197 if (m_state != State::Active) … … 203 203 void SOAuthorizationSession::abort() 204 204 { 205 RELEASE_LOG_IF_ALLOWED("abort:");205 AUTHORIZATIONSESSION_RELEASE_LOG("abort:"); 206 206 207 207 if (m_state == State::Idle || m_state == State::Completed) … … 227 227 auto cookies = toCookieVector([NSHTTPCookie cookiesWithResponseHeaderFields:httpResponse.allHeaderFields forURL:response.url()]); 228 228 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); 230 230 231 231 if (cookies.isEmpty()) { … … 240 240 return; 241 241 242 RELEASE_LOG_IF_ALLOWED("complete: Cookies are set.");242 AUTHORIZATIONSESSION_RELEASE_LOG("complete: Cookies are set."); 243 243 244 244 completeInternal(response, data.get()); … … 248 248 void SOAuthorizationSession::presentViewController(SOAuthorizationViewController viewController, UICallback uiCallback) 249 249 { 250 RELEASE_LOG_IF_ALLOWED("presentViewController:");250 AUTHORIZATIONSESSION_RELEASE_LOG("presentViewController:"); 251 251 252 252 ASSERT(m_state == State::Active); … … 276 276 } 277 277 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()); 279 279 [presentingWindow beginSheet:m_sheetWindow.get() completionHandler:nil]; 280 280 #elif PLATFORM(IOS) … … 293 293 void SOAuthorizationSession::dismissViewController() 294 294 { 295 RELEASE_LOG_IF_ALLOWED("dismissViewController:");295 AUTHORIZATIONSESSION_RELEASE_LOG("dismissViewController:"); 296 296 297 297 ASSERT(m_viewController); … … 304 304 auto *presentingWindow = m_page->platformWindow(); 305 305 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."); 307 307 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()); 309 309 return; 310 310 } 311 311 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."); 313 313 dismissViewController(); 314 314 [[NSNotificationCenter defaultCenter] removeObserver:m_presentingWindowDidDeminiaturizeObserver.get()]; … … 320 320 321 321 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."); 323 323 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()); 325 325 return; 326 326 } 327 327 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."); 329 329 dismissViewController(); 330 330 [[NSNotificationCenter defaultCenter] removeObserver:m_applicationDidUnhideObserver.get()]; … … 338 338 339 339 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()); 341 341 [presentingWindow endSheet:m_sheetWindow.get()]; 342 342 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()); 344 344 #elif PLATFORM(IOS) 345 345 [[m_viewController presentingViewController] dismissViewControllerAnimated:YES completion:nil]; … … 351 351 } // namespace WebKit 352 352 353 #undef RELEASE_LOG_IF_ALLOWED353 #undef AUTHORIZATIONSESSION_RELEASE_LOG 354 354 355 355 #endif // HAVE(APP_SSO) -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
r278253 r278315 56 56 using namespace WebCore; 57 57 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__) 60 60 61 61 ProvisionalPageProxy::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) … … 77 77 #endif 78 78 { 79 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "ProvisionalPageProxy: suspendedPage=%p", suspendedPage.get());79 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "ProvisionalPageProxy: suspendedPage=%p", suspendedPage.get()); 80 80 81 81 m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_webPageID, *this); … … 119 119 void ProvisionalPageProxy::processDidTerminate() 120 120 { 121 RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "processDidTerminate:");121 PROVISIONALPAGEPROXY_RELEASE_LOG_ERROR(ProcessSwapping, "processDidTerminate:"); 122 122 m_page.provisionalProcessDidTerminate(); 123 123 } … … 136 136 ASSERT(m_process->state() == WebProcessProxy::State::Running); 137 137 138 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "cancel: Simulating a didFailProvisionalLoadForFrame");138 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "cancel: Simulating a didFailProvisionalLoadForFrame"); 139 139 ASSERT(m_mainFrame); 140 140 auto error = WebKit::cancelledError(m_request); … … 165 165 void 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) 166 166 { 167 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadData:");167 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "loadData:"); 168 168 169 169 m_page.loadDataWithNavigationShared(m_process.copyRef(), m_webPageID, navigation, data, MIMEType, encoding, baseURL, userData, WebCore::ShouldTreatAsContinuingLoad::Yes, isNavigatingToAppBoundDomain, WTFMove(websitePolicies), navigation.lastNavigationAction().shouldOpenExternalURLsPolicy); … … 172 172 void ProvisionalPageProxy::loadRequest(API::Navigation& navigation, WebCore::ResourceRequest&& request, API::Object* userData, std::optional<NavigatingToAppBoundDomain> isNavigatingToAppBoundDomain, std::optional<WebsitePoliciesData>&& websitePolicies) 173 173 { 174 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadRequest:");174 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "loadRequest:"); 175 175 176 176 // 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, … … 185 185 void ProvisionalPageProxy::goToBackForwardItem(API::Navigation& navigation, WebBackForwardListItem& item, RefPtr<API::WebsitePolicies>&& websitePolicies) 186 186 { 187 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "goToBackForwardItem:");187 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "goToBackForwardItem:"); 188 188 189 189 auto itemStates = m_page.backForwardList().filteredItemStates([this, targetItem = &item](auto& item) { … … 215 215 void ProvisionalPageProxy::didCreateMainFrame(FrameIdentifier frameID) 216 216 { 217 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateMainFrame: frameID=%" PRIu64, frameID.toUInt64());217 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCreateMainFrame: frameID=%" PRIu64, frameID.toUInt64()); 218 218 ASSERT(!m_mainFrame); 219 219 … … 253 253 return; 254 254 255 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didStartProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());255 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didStartProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64()); 256 256 ASSERT(m_provisionalLoadURL.isNull()); 257 257 m_provisionalLoadURL = url; … … 273 273 return; 274 274 275 RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "didFailProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());275 PROVISIONALPAGEPROXY_RELEASE_LOG_ERROR(ProcessSwapping, "didFailProvisionalLoadForFrame: frameID=%" PRIu64, frameID.toUInt64()); 276 276 ASSERT(!m_provisionalLoadURL.isNull()); 277 277 m_provisionalLoadURL = { }; … … 289 289 return; 290 290 291 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCommitLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());291 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCommitLoadForFrame: frameID=%" PRIu64, frameID.toUInt64()); 292 292 m_provisionalLoadURL = { }; 293 293 m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_webPageID); … … 422 422 void ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation(LayerHostingContextID contextID) 423 423 { 424 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateContextInWebProcessForVisibilityPropagation: contextID=%u", contextID);424 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCreateContextInWebProcessForVisibilityPropagation: contextID=%u", contextID); 425 425 m_contextIDForVisibilityPropagationInWebProcess = contextID; 426 426 } … … 429 429 void ProvisionalPageProxy::didCreateContextInGPUProcessForVisibilityPropagation(LayerHostingContextID contextID) 430 430 { 431 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateContextInGPUProcessForVisibilityPropagation: contextID=%u", contextID);431 PROVISIONALPAGEPROXY_RELEASE_LOG(ProcessSwapping, "didCreateContextInGPUProcessForVisibilityPropagation: contextID=%u", contextID); 432 432 m_contextIDForVisibilityPropagationInGPUProcess = contextID; 433 433 } -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
r274457 r278315 505 505 bool RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed() const 506 506 { 507 return m_webPageProxy. isAlwaysOnLoggingAllowed();507 return m_webPageProxy.sessionID().isAlwaysOnLoggingAllowed(); 508 508 } 509 509 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r278254 r278315 316 316 #define MESSAGE_CHECK_COMPLETION(process, assertion, completion) MESSAGE_CHECK_COMPLETION_BASE(assertion, process->connection(), completion) 317 317 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__) 320 320 321 321 // Represents the number of wheel events we can hold in the queue before we start pushing them preemptively. … … 511 511 #endif 512 512 { 513 RELEASE_LOG_IF_ALLOWED(Loading, "constructor:");513 WEBPAGEPROXY_RELEASE_LOG(Loading, "constructor:"); 514 514 515 515 if (!m_configuration->drawsBackground()) … … 573 573 WebPageProxy::~WebPageProxy() 574 574 { 575 RELEASE_LOG_IF_ALLOWED(Loading, "destructor:");575 WEBPAGEPROXY_RELEASE_LOG(Loading, "destructor:"); 576 576 577 577 ASSERT(m_process->webPage(m_identifier) != this); … … 824 824 ASSERT(!hasRunningProcess()); 825 825 826 RELEASE_LOG_IF_ALLOWED(Loading, "launchProcess:");826 WEBPAGEPROXY_RELEASE_LOG(Loading, "launchProcess:"); 827 827 828 828 // In case we are currently connected to the dummy process, we need to make sure the inspector proxy … … 866 866 867 867 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()); 869 869 return false; 870 870 } 871 871 872 872 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()); 874 874 return false; 875 875 } … … 880 880 // there is no need to suspend the previous page as there will be no way to get back to it. 881 881 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()); 883 883 return false; 884 884 } 885 885 886 886 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()); 888 888 return false; 889 889 } … … 892 892 if (!needsSuspendedPageToPreventFlashing && (!fromItem || !shouldUseBackForwardCache())) { 893 893 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()); 895 895 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()); 897 897 return false; 898 898 } 899 899 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()); 901 901 auto suspendedPage = makeUnique<SuspendedPageProxy>(*this, m_process.copyRef(), *mainFrameID, shouldDelayClosingUntilFirstLayerFlush); 902 902 … … 928 928 { 929 929 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()); 931 931 932 932 m_process = provisionalPage->process(); … … 942 942 #endif 943 943 944 // FIXME: Do we really need to disable this logging in ephemeral sessions? 944 945 if (m_logger) 945 m_logger->setEnabled(this, isAlwaysOnLoggingAllowed());946 m_logger->setEnabled(this, !sessionID().isEphemeral()); 946 947 947 948 m_hasRunningProcess = true; … … 1036 1037 RefPtr<API::Navigation> WebPageProxy::launchProcessForReload() 1037 1038 { 1038 RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload:");1039 WEBPAGEPROXY_RELEASE_LOG(Loading, "launchProcessForReload:"); 1039 1040 1040 1041 if (m_isClosed) { 1041 RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: page is closed");1042 WEBPAGEPROXY_RELEASE_LOG(Loading, "launchProcessForReload: page is closed"); 1042 1043 return nullptr; 1043 1044 } … … 1048 1049 1049 1050 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"); 1051 1052 return nullptr; 1052 1053 } … … 1110 1111 return; 1111 1112 1112 RELEASE_LOG_IF_ALLOWED(Loading, "close:");1113 WEBPAGEPROXY_RELEASE_LOG(Loading, "close:"); 1113 1114 1114 1115 m_isClosed = true; … … 1189 1190 return true; 1190 1191 1191 RELEASE_LOG_IF_ALLOWED(Process, "tryClose:");1192 WEBPAGEPROXY_RELEASE_LOG(Process, "tryClose:"); 1192 1193 1193 1194 // Close without delay if the process allows it. Our goal is to terminate … … 1214 1215 void WebPageProxy::tryCloseTimedOut() 1215 1216 { 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"); 1217 1218 closePage(); 1218 1219 } … … 1311 1312 return nullptr; 1312 1313 1313 RELEASE_LOG_IF_ALLOWED(Loading, "loadRequest:");1314 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadRequest:"); 1314 1315 1315 1316 if (!hasRunningProcess()) … … 1333 1334 ASSERT(!m_isClosed); 1334 1335 1335 RELEASE_LOG_IF_ALLOWED(Loading, "loadRequestWithNavigationShared:");1336 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadRequestWithNavigationShared:"); 1336 1337 1337 1338 auto transaction = m_pageLoadState.transaction(); … … 1369 1370 RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, const String& resourceDirectoryURLString, API::Object* userData) 1370 1371 { 1371 RELEASE_LOG_IF_ALLOWED(Loading, "loadFile:");1372 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadFile:"); 1372 1373 1373 1374 if (m_isClosed) { 1374 RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: page is closed");1375 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadFile: page is closed"); 1375 1376 return nullptr; 1376 1377 } … … 1381 1382 URL fileURL = URL(URL(), fileURLString); 1382 1383 if (!fileURL.isLocalFile()) { 1383 RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: file is not local");1384 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadFile: file is not local"); 1384 1385 return nullptr; 1385 1386 } … … 1391 1392 resourceDirectoryURL = URL(URL(), resourceDirectoryURLString); 1392 1393 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"); 1394 1395 return nullptr; 1395 1396 } … … 1425 1426 RefPtr<API::Navigation> WebPageProxy::loadData(const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy) 1426 1427 { 1427 RELEASE_LOG_IF_ALLOWED(Loading, "loadData:");1428 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadData:"); 1428 1429 1429 1430 #if ENABLE(APP_BOUND_DOMAINS) … … 1433 1434 1434 1435 if (m_isClosed) { 1435 RELEASE_LOG_IF_ALLOWED(Loading, "loadData: page is closed");1436 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadData: page is closed"); 1436 1437 return nullptr; 1437 1438 } … … 1451 1452 void 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) 1452 1453 { 1453 RELEASE_LOG_IF_ALLOWED(Loading, "loadDataWithNavigation");1454 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadDataWithNavigation"); 1454 1455 1455 1456 ASSERT(!m_isClosed); … … 1479 1480 RefPtr<API::Navigation> WebPageProxy::loadSimulatedRequest(WebCore::ResourceRequest&& simulatedRequest, WebCore::ResourceResponse&& simulatedResponse, const IPC::DataReference& data) 1480 1481 { 1481 RELEASE_LOG_IF_ALLOWED(Loading, "loadSimulatedRequest:");1482 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadSimulatedRequest:"); 1482 1483 1483 1484 #if ENABLE(APP_BOUND_DOMAINS) … … 1487 1488 1488 1489 if (m_isClosed) { 1489 RELEASE_LOG_IF_ALLOWED(Loading, "loadSimulatedRequest: page is closed");1490 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadSimulatedRequest: page is closed"); 1490 1491 return nullptr; 1491 1492 } … … 1533 1534 void WebPageProxy::loadAlternateHTML(const IPC::DataReference& htmlData, const String& encoding, const URL& baseURL, const URL& unreachableURL, API::Object* userData) 1534 1535 { 1535 RELEASE_LOG_IF_ALLOWED(Loading, "loadAlternateHTML");1536 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadAlternateHTML"); 1536 1537 1537 1538 // When the UIProcess is in the process of handling a failing provisional load, do not attempt to … … 1539 1540 // handled properly. 1540 1541 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)"); 1542 1543 return; 1543 1544 } … … 1576 1577 void WebPageProxy::loadWebArchiveData(API::Data* webArchiveData, API::Object* userData) 1577 1578 { 1578 RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData:");1579 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadWebArchiveData:"); 1579 1580 1580 1581 if (m_isClosed) { 1581 RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData: page is closed");1582 WEBPAGEPROXY_RELEASE_LOG(Loading, "loadWebArchiveData: page is closed"); 1582 1583 return; 1583 1584 } … … 1603 1604 void WebPageProxy::navigateToPDFLinkWithSimulatedClick(const String& urlString, IntPoint documentPoint, IntPoint screenPoint) 1604 1605 { 1605 RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick:");1606 WEBPAGEPROXY_RELEASE_LOG(Loading, "navigateToPDFLinkWithSimulatedClick:"); 1606 1607 1607 1608 if (m_isClosed) { 1608 RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is closed:");1609 WEBPAGEPROXY_RELEASE_LOG(Loading, "navigateToPDFLinkWithSimulatedClick: page is closed:"); 1609 1610 return; 1610 1611 } … … 1622 1623 void WebPageProxy::stopLoading() 1623 1624 { 1624 RELEASE_LOG_IF_ALLOWED(Loading, "stopLoading:");1625 WEBPAGEPROXY_RELEASE_LOG(Loading, "stopLoading:"); 1625 1626 1626 1627 if (!hasRunningProcess()) { 1627 RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is not valid");1628 WEBPAGEPROXY_RELEASE_LOG(Loading, "navigateToPDFLinkWithSimulatedClick: page is not valid"); 1628 1629 return; 1629 1630 } … … 1639 1640 RefPtr<API::Navigation> WebPageProxy::reload(OptionSet<WebCore::ReloadOption> options) 1640 1641 { 1641 RELEASE_LOG_IF_ALLOWED(Loading, "reload:");1642 WEBPAGEPROXY_RELEASE_LOG(Loading, "reload:"); 1642 1643 1643 1644 SandboxExtension::Handle sandboxExtensionHandle; … … 1720 1721 RefPtr<API::Navigation> WebPageProxy::goToBackForwardItem(WebBackForwardListItem& item, FrameLoadType frameLoadType) 1721 1722 { 1722 RELEASE_LOG_IF_ALLOWED(Loading, "goToBackForwardItem:");1723 WEBPAGEPROXY_RELEASE_LOG(Loading, "goToBackForwardItem:"); 1723 1724 LOG(Loading, "WebPageProxy %p goToBackForwardItem to item URL %s", this, item.url().utf8().data()); 1724 1725 1725 1726 if (m_isClosed) { 1726 RELEASE_LOG_IF_ALLOWED(Loading, "goToBackForwardItem: page is closed");1727 WEBPAGEPROXY_RELEASE_LOG(Loading, "goToBackForwardItem: page is closed"); 1727 1728 return nullptr; 1728 1729 } … … 1750 1751 void WebPageProxy::tryRestoreScrollPosition() 1751 1752 { 1752 RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition:");1753 WEBPAGEPROXY_RELEASE_LOG(Loading, "tryRestoreScrollPosition:"); 1753 1754 1754 1755 if (!hasRunningProcess()) { 1755 RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition: page is not valid");1756 WEBPAGEPROXY_RELEASE_LOG(Loading, "tryRestoreScrollPosition: page is not valid"); 1756 1757 return; 1757 1758 } … … 2022 2023 m_activityState.add(ActivityState::IsVisible); 2023 2024 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); 2025 2026 } 2026 2027 if (flagsToUpdate & ActivityState::IsVisibleOrOccluded && pageClient().isViewVisibleOrOccluded()) … … 2182 2183 } 2183 2184 2184 bool WebPageProxy::isAlwaysOnLoggingAllowed() const2185 {2186 return sessionID().isAlwaysOnLoggingAllowed();2187 }2188 2189 2185 void WebPageProxy::updateThrottleState() 2190 2186 { … … 2205 2201 if (isViewVisible()) { 2206 2202 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"); 2208 2204 m_isVisibleActivity = m_process->throttler().foregroundActivity("View is visible"_s).moveToUniquePtr(); 2209 2205 } 2210 2206 } 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"); 2212 2208 m_isVisibleActivity = nullptr; 2213 2209 } … … 2216 2212 if (isAudible) { 2217 2213 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"); 2219 2215 m_isAudibleActivity = m_process->throttler().foregroundActivity("View is playing audio"_s).moveToUniquePtr(); 2220 2216 } 2221 2217 m_audibleActivityTimer.stop(); 2222 2218 } 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()); 2224 2220 if (!m_audibleActivityTimer.isActive()) 2225 2221 m_audibleActivityTimer.startOneShot(audibleActivityClearDelay); … … 2229 2225 if (isCapturingMedia) { 2230 2226 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"); 2232 2228 m_isCapturingActivity = m_process->throttler().foregroundActivity("View is capturing media"_s).moveToUniquePtr(); 2233 2229 } 2234 2230 } 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"); 2236 2232 m_isCapturingActivity = nullptr; 2237 2233 } … … 2242 2238 void WebPageProxy::clearAudibleActivity() 2243 2239 { 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"); 2245 2241 m_isAudibleActivity = nullptr; 2246 2242 } … … 2525 2521 { 2526 2522 ASSERT(m_hasUpdatedRenderingAfterDidCommitLoad); 2527 RELEASE_LOG_IF_ALLOWED(Process, "stopMakingViewBlankDueToLackOfRenderingUpdate:");2523 WEBPAGEPROXY_RELEASE_LOG(Process, "stopMakingViewBlankDueToLackOfRenderingUpdate:"); 2528 2524 pageClient().makeViewBlank(false); 2529 2525 } … … 2541 2537 #endif 2542 2538 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"); 2544 2540 pageClient().makeViewBlank(true); 2545 2541 } … … 3355 3351 void WebPageProxy::receivedNavigationPolicyDecision(PolicyAction policyAction, API::Navigation* navigation, Ref<API::NavigationAction>&& navigationAction, ProcessSwapRequestedByClient processSwapRequestedByClient, WebFrameProxy& frame, RefPtr<API::WebsitePolicies>&& policies, Ref<PolicyDecisionSender>&& sender) 3356 3352 { 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); 3358 3354 3359 3355 Ref<WebsiteDataStore> websiteDataStore = m_websiteDataStore.copyRef(); … … 3417 3413 if (shouldProcessSwap) { 3418 3414 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()); 3420 3416 LOG(ProcessSwapping, "(ProcessSwapping) Switching from process %i to new process (%i) for navigation %" PRIu64 " '%s'", processIdentifier(), processForNavigation->processIdentifier(), navigation->navigationID(), navigation->loggingString()); 3421 3417 } 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()); 3423 3419 3424 3420 std::optional<SandboxExtension::Handle> optionalHandle; … … 3499 3495 { 3500 3496 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()); 3502 3498 3503 3499 std::optional<FrameIdentifier> mainFrameIDInPreviousProcess = m_mainFrame ? std::make_optional(m_mainFrame->frameID()) : std::nullopt; … … 3537 3533 void WebPageProxy::continueNavigationInNewProcess(API::Navigation& navigation, std::unique_ptr<SuspendedPageProxy>&& suspendedPage, Ref<WebProcessProxy>&& newProcess, ProcessSwapRequestedByClient processSwapRequestedByClient, RefPtr<API::WebsitePolicies>&& websitePolicies) 3538 3534 { 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); 3540 3536 LOG(Loading, "Continuing navigation %" PRIu64 " '%s' in a new web process", navigation.navigationID(), navigation.loggingString()); 3541 3537 RELEASE_ASSERT(!newProcess->isInProcessCache()); 3542 3538 3543 3539 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()); 3545 3541 if (m_provisionalPage->navigationID() != navigation.navigationID()) 3546 3542 m_provisionalPage->cancel(); … … 3675 3671 void WebPageProxy::suspend(CompletionHandler<void(bool)>&& completionHandler) 3676 3672 { 3677 RELEASE_LOG_IF_ALLOWED(Loading, "suspend:");3673 WEBPAGEPROXY_RELEASE_LOG(Loading, "suspend:"); 3678 3674 if (!hasRunningProcess() || m_isSuspended) 3679 3675 return completionHandler(false); … … 3685 3681 void WebPageProxy::resume(CompletionHandler<void(bool)>&& completionHandler) 3686 3682 { 3687 RELEASE_LOG_IF_ALLOWED(Loading, "resume:");3683 WEBPAGEPROXY_RELEASE_LOG(Loading, "resume:"); 3688 3684 3689 3685 if (!hasRunningProcess() || !m_isSuspended) … … 3731 3727 RefPtr<API::Navigation> WebPageProxy::restoreFromSessionState(SessionState sessionState, bool navigate) 3732 3728 { 3733 RELEASE_LOG_IF_ALLOWED(Loading, "restoreFromSessionState:");3729 WEBPAGEPROXY_RELEASE_LOG(Loading, "restoreFromSessionState:"); 3734 3730 3735 3731 m_sessionRestorationRenderTreeSize = 0; … … 4549 4545 4550 4546 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()); 4552 4548 4553 4549 auto transaction = m_pageLoadState.transaction(); … … 4586 4582 4587 4583 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"); 4589 4585 return; 4590 4586 } … … 4611 4607 { 4612 4608 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()); 4614 4610 4615 4611 PageClientProtector protector(pageClient()); … … 4640 4636 void WebPageProxy::willPerformClientRedirectForFrame(FrameIdentifier frameID, const String& url, double delay, WebCore::LockBackForwardList) 4641 4637 { 4642 RELEASE_LOG_IF_ALLOWED(Loading, "willPerformClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64());4638 WEBPAGEPROXY_RELEASE_LOG(Loading, "willPerformClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64()); 4643 4639 4644 4640 PageClientProtector protector(pageClient()); … … 4653 4649 void WebPageProxy::didCancelClientRedirectForFrame(FrameIdentifier frameID) 4654 4650 { 4655 RELEASE_LOG_IF_ALLOWED(Loading, "didCancelClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64());4651 WEBPAGEPROXY_RELEASE_LOG(Loading, "didCancelClientRedirectForFrame: frameID=%" PRIu64, frameID.toUInt64()); 4656 4652 4657 4653 PageClientProtector protector(pageClient()); … … 4701 4697 { 4702 4698 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()); 4704 4700 4705 4701 PageClientProtector protector(pageClient()); … … 4772 4768 LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " didCommitLoadForFrame in navigation %" PRIu64, m_identifier.toUInt64(), navigationID); 4773 4769 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()); 4775 4771 4776 4772 PageClientProtector protector(pageClient()); … … 4896 4892 void WebPageProxy::didFinishDocumentLoadForFrame(FrameIdentifier frameID, uint64_t navigationID, const UserData& userData) 4897 4893 { 4898 RELEASE_LOG_IF_ALLOWED(Loading, "didFinishDocumentLoadForFrame: frameID=%" PRIu64, frameID.toUInt64());4894 WEBPAGEPROXY_RELEASE_LOG(Loading, "didFinishDocumentLoadForFrame: frameID=%" PRIu64, frameID.toUInt64()); 4899 4895 4900 4896 PageClientProtector protector(pageClient()); … … 4924 4920 { 4925 4921 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()); 4927 4923 4928 4924 PageClientProtector protector(pageClient()); … … 4975 4971 void WebPageProxy::didFailLoadForFrame(FrameIdentifier frameID, FrameInfoData&& frameInfo, ResourceRequest&& request, uint64_t navigationID, const ResourceError& error, const UserData& userData) 4976 4972 { 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()); 4978 4974 4979 4975 PageClientProtector protector(pageClient()); … … 5020 5016 void WebPageProxy::didSameDocumentNavigationForFrame(FrameIdentifier frameID, uint64_t navigationID, uint32_t opaqueSameDocumentNavigationType, URL&& url, const UserData& userData) 5021 5017 { 5022 RELEASE_LOG_IF_ALLOWED(Loading, "didSameDocumentNavigationForFrame: frameID=%" PRIu64, frameID.toUInt64());5018 WEBPAGEPROXY_RELEASE_LOG(Loading, "didSameDocumentNavigationForFrame: frameID=%" PRIu64, frameID.toUInt64()); 5023 5019 5024 5020 PageClientProtector protector(pageClient()); … … 5206 5202 IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, Ref<PolicyDecisionSender>&& sender) 5207 5203 { 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); 5209 5205 5210 5206 LOG(Loading, "WebPageProxy::decidePolicyForNavigationAction - Original URL %s, current target URL %s", originalRequest.url().string().utf8().data(), request.url().string().utf8().data()); … … 5222 5218 5223 5219 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"); 5225 5221 sender->send(PolicyDecision { sender->identifier(), isNavigatingToAppBoundDomain(), PolicyAction::Ignore, 0, std::nullopt, std::nullopt }); 5226 5222 return; … … 5288 5284 #if ENABLE(CONTENT_FILTERING) 5289 5285 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"); 5291 5287 return receivedPolicyDecision(PolicyAction::Ignore, m_navigationState->navigation(navigationID), nullptr, WTFMove(navigationAction), WTFMove(sender)); 5292 5288 } … … 5303 5299 5304 5300 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); 5306 5302 5307 5303 auto completionHandler = [this, protectedThis, frame, sender = WTFMove(sender), navigation, navigationAction = WTFMove(navigationAction), processSwapRequestedByClient, policies = makeRefPtr(policies)] (PolicyAction policyAction) mutable { … … 5322 5318 auto error = errorForUnpermittedAppBoundDomainNavigation(navigation->currentRequest().url()); 5323 5319 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"); 5325 5321 completionHandler(PolicyAction::Ignore); 5326 5322 return; … … 5598 5594 void WebPageProxy::didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&& process, const WebNavigationDataStore& store, FrameIdentifier frameID) 5599 5595 { 5600 RELEASE_LOG_IF_ALLOWED(Loading, "didNavigateWithNavigationDataShared:");5596 WEBPAGEPROXY_RELEASE_LOG(Loading, "didNavigateWithNavigationDataShared:"); 5601 5597 5602 5598 PageClientProtector protector(pageClient()); … … 5618 5614 void WebPageProxy::didPerformClientRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 5619 5615 { 5620 RELEASE_LOG_IF_ALLOWED(Loading, "didPerformClientRedirectShared: frameID=%" PRIu64, frameID.toUInt64());5616 WEBPAGEPROXY_RELEASE_LOG(Loading, "didPerformClientRedirectShared: frameID=%" PRIu64, frameID.toUInt64()); 5621 5617 5622 5618 PageClientProtector protector(pageClient()); … … 5645 5641 void WebPageProxy::didPerformServerRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, FrameIdentifier frameID) 5646 5642 { 5647 RELEASE_LOG_IF_ALLOWED(Loading, "didPerformServerRedirect:");5643 WEBPAGEPROXY_RELEASE_LOG(Loading, "didPerformServerRedirect:"); 5648 5644 5649 5645 PageClientProtector protector(pageClient()); … … 5775 5771 return; 5776 5772 5777 RELEASE_LOG_IF_ALLOWED(Process, "closePage:");5773 WEBPAGEPROXY_RELEASE_LOG(Process, "closePage:"); 5778 5774 pageClient().clearAllEditCommands(); 5779 5775 m_uiClient->close(this); … … 7496 7492 void WebPageProxy::processDidBecomeUnresponsive() 7497 7493 { 7498 RELEASE_LOG_ERROR_IF_ALLOWED(Process, "processDidBecomeUnresponsive:");7494 WEBPAGEPROXY_RELEASE_LOG_ERROR(Process, "processDidBecomeUnresponsive:"); 7499 7495 7500 7496 if (!hasRunningProcess()) … … 7508 7504 void WebPageProxy::processDidBecomeResponsive() 7509 7505 { 7510 RELEASE_LOG_IF_ALLOWED(Process, "processDidBecomeResponsive:");7506 WEBPAGEPROXY_RELEASE_LOG(Process, "processDidBecomeResponsive:"); 7511 7507 7512 7508 if (!hasRunningProcess()) … … 7549 7545 { 7550 7546 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); 7552 7548 7553 7549 ASSERT(m_hasRunningProcess); … … 7603 7599 void WebPageProxy::dispatchProcessDidTerminate(ProcessTerminationReason reason) 7604 7600 { 7605 RELEASE_LOG_ERROR_IF_ALLOWED(Loading, "dispatchProcessDidTerminate: reason=%d", reason);7601 WEBPAGEPROXY_RELEASE_LOG_ERROR(Loading, "dispatchProcessDidTerminate: reason=%d", reason); 7606 7602 7607 7603 bool handledByClient = false; … … 7620 7616 7621 7617 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"); 7623 7619 m_recentCrashCount = 0; 7624 7620 return; 7625 7621 } 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"); 7627 7623 reload(ReloadOption::ExpiredOnly); 7628 7624 } … … 8271 8267 void 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) 8272 8268 { 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); 8274 8270 8275 8271 StorageRequests::singleton().processOrAppend([this, protectedThis = makeRef(*this), pageURL = currentURL(), frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, completionHandler = WTFMove(completionHandler)]() mutable { 8276 8272 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 { 8277 8273 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); 8279 8275 UNUSED_VARIABLE(frameID); 8280 8276 8281 8277 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"); 8283 8279 m_isQuotaIncreaseDenied = true; 8284 8280 } … … 9369 9365 m_updateReportedMediaCaptureStateTimer.startOneShot(m_mediaCaptureReportingDelay); 9370 9366 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()); 9372 9368 9373 9369 bool microphoneCaptureChanged = (m_reportedMediaCaptureState & MediaProducer::AudioCaptureMask) != (activeCaptureState & MediaProducer::AudioCaptureMask); … … 9608 9604 void WebPageProxy::didExceedInactiveMemoryLimitWhileActive() 9609 9605 { 9610 RELEASE_LOG_ERROR_IF_ALLOWED(PerformanceLogging, "didExceedInactiveMemoryLimitWhileActive");9606 WEBPAGEPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedInactiveMemoryLimitWhileActive"); 9611 9607 m_uiClient->didExceedBackgroundResourceLimitWhileInForeground(*this, kWKResourceLimitMemory); 9612 9608 } … … 9614 9610 void WebPageProxy::didExceedBackgroundCPULimitWhileInForeground() 9615 9611 { 9616 RELEASE_LOG_ERROR_IF_ALLOWED(PerformanceLogging, "didExceedBackgroundCPULimitWhileInForeground");9612 WEBPAGEPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedBackgroundCPULimitWhileInForeground"); 9617 9613 m_uiClient->didExceedBackgroundResourceLimitWhileInForeground(*this, kWKResourceLimitCPU); 9618 9614 } … … 10422 10418 if (!m_logger) { 10423 10419 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()); 10425 10422 } 10426 10423 … … 10681 10678 } // namespace WebKit 10682 10679 10683 #undef RELEASE_LOG_IF_ALLOWED 10680 #undef WEBPAGEPROXY_RELEASE_LOG 10681 #undef WEBPAGEPROXY_RELEASE_LOG_ERROR 10684 10682 #undef MESSAGE_CHECK_COMPLETION 10685 10683 #undef MESSAGE_CHECK_URL -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r278253 r278315 1591 1591 void setShouldPlayToPlaybackTarget(WebCore::PlaybackTargetClientContextIdentifier, bool) final; 1592 1592 void playbackTargetPickerWasDismissed(WebCore::PlaybackTargetClientContextIdentifier) final; 1593 bool alwaysOnLoggingAllowed() const final { return isAlwaysOnLoggingAllowed(); }1593 bool alwaysOnLoggingAllowed() const final { return sessionID().isAlwaysOnLoggingAllowed(); } 1594 1594 bool useiTunesAVOutputContext() const final; 1595 1595 PlatformView* platformView() const final; … … 1624 1624 bool isNeverRichlyEditableForTouchBar() const { return m_isNeverRichlyEditableForTouchBar; } 1625 1625 #endif 1626 1627 bool isAlwaysOnLoggingAllowed() const;1628 1626 1629 1627 #if ENABLE(GAMEPAD) -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r278253 r278315 82 82 #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process().connection()) 83 83 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__) 85 85 86 86 namespace WebKit { … … 590 590 bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; 591 591 592 RELEASE_LOG_IF_ALLOWED(ViewState, "applicationDidEnterBackground: isSuspendedUnderLock? %d", isSuspendedUnderLock);592 WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationDidEnterBackground: isSuspendedUnderLock? %d", isSuspendedUnderLock); 593 593 594 594 #if !PLATFORM(WATCHOS) … … 620 620 621 621 bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; 622 RELEASE_LOG_IF_ALLOWED(ViewState, "applicationWillEnterForeground: isSuspendedUnderLock? %d", isSuspendedUnderLock);622 WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationWillEnterForeground: isSuspendedUnderLock? %d", isSuspendedUnderLock); 623 623 624 624 m_process->send(Messages::WebPage::ApplicationWillEnterForeground(isSuspendedUnderLock), m_webPageID); … … 634 634 { 635 635 bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; 636 RELEASE_LOG_IF_ALLOWED(ViewState, "applicationWillEnterForegroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);636 WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationWillEnterForegroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock); 637 637 638 638 m_process->send(Messages::WebPage::ApplicationDidEnterBackgroundForMedia(isSuspendedUnderLock), m_webPageID); … … 642 642 { 643 643 bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock]; 644 RELEASE_LOG_IF_ALLOWED(ViewState, "applicationDidEnterBackgroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);644 WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationDidEnterBackgroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock); 645 645 646 646 m_process->send(Messages::WebPage::ApplicationWillEnterForegroundForMedia(isSuspendedUnderLock), m_webPageID); … … 1467 1467 1468 1468 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); 1470 1470 return canTakeForegroundAssertions; 1471 1471 } … … 1579 1579 } // namespace WebKit 1580 1580 1581 #undef RELEASE_LOG_IF_ALLOWED1581 #undef WEBPAGEPROXY_RELEASE_LOG 1582 1582 #undef MESSAGE_CHECK 1583 1583
Note:
See TracChangeset
for help on using the changeset viewer.