Skip to content

Commit

Permalink
Remove the DidExceedBackgroundResourceLimitWhileInForeground delegate…
Browse files Browse the repository at this point in the history
… callback

https://bugs.webkit.org/show_bug.cgi?id=246230
<rdar://problem/100908756>

Reviewed by Chris Dumez.

Because it is unused.

* Source/WTF/wtf/MemoryPressureHandler.cpp:
(WTF::MemoryPressureHandler::doesExceedInactiveLimitWhileActive): Deleted.
(WTF::MemoryPressureHandler::doesNotExceedInactiveLimitWhileActive): Deleted.
* Source/WTF/wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::setMemoryPressureStatusChangedCallback):
(WTF::MemoryPressureHandler::setDidExceedInactiveLimitWhileActiveCallback): Deleted.
* Source/WebKit/UIProcess/API/APIUIClient.h:
(API::UIClient::didExceedBackgroundResourceLimitWhileInForeground): Deleted.
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* Source/WebKit/UIProcess/API/C/WKPageUIClient.h:
* Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.h:
* Source/WebKit/UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didExceedBackgroundResourceLimitWhileInForeground): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive): Deleted.
(WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didExceedCPULimit):
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimitWhileActive): Deleted.
* Source/WebKit/UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::isUnderMemoryPressure const):
* Source/WebKit/UIProcess/WebProcessProxy.messages.in:
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

Canonical link: https://commits.webkit.org/255301@main
  • Loading branch information
geoffreygaren committed Oct 8, 2022
1 parent c3770c7 commit cb6582e
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 115 deletions.
19 changes: 0 additions & 19 deletions Source/WTF/wtf/MemoryPressureHandler.cpp
Expand Up @@ -229,25 +229,6 @@ void MemoryPressureHandler::measurementTimerFired()
releaseMemory(Critical::Yes, Synchronous::No);
break;
}

if (processState() == WebsamProcessState::Active && footprint > thresholdForMemoryKillOfInactiveProcess(m_pageCount))
doesExceedInactiveLimitWhileActive();
else
doesNotExceedInactiveLimitWhileActive();
}

void MemoryPressureHandler::doesExceedInactiveLimitWhileActive()
{
if (m_hasInvokedDidExceedInactiveLimitWhileActiveCallback)
return;
if (m_didExceedInactiveLimitWhileActiveCallback)
m_didExceedInactiveLimitWhileActiveCallback();
m_hasInvokedDidExceedInactiveLimitWhileActiveCallback = true;
}

void MemoryPressureHandler::doesNotExceedInactiveLimitWhileActive()
{
m_hasInvokedDidExceedInactiveLimitWhileActiveCallback = false;
}

void MemoryPressureHandler::setProcessState(WebsamProcessState state)
Expand Down
5 changes: 0 additions & 5 deletions Source/WTF/wtf/MemoryPressureHandler.h
Expand Up @@ -87,7 +87,6 @@ class MemoryPressureHandler {

void setMemoryKillCallback(WTF::Function<void()>&& function) { m_memoryKillCallback = WTFMove(function); }
void setMemoryPressureStatusChangedCallback(WTF::Function<void(MemoryPressureStatus)>&& function) { m_memoryPressureStatusChangedCallback = WTFMove(function); }
void setDidExceedInactiveLimitWhileActiveCallback(WTF::Function<void()>&& function) { m_didExceedInactiveLimitWhileActiveCallback = WTFMove(function); }

void setLowMemoryHandler(LowMemoryHandler&& handler)
{
Expand Down Expand Up @@ -250,16 +249,13 @@ class MemoryPressureHandler {
void measurementTimerFired();
void shrinkOrDie(size_t killThreshold);
void setMemoryUsagePolicyBasedOnFootprint(size_t);
void doesExceedInactiveLimitWhileActive();
void doesNotExceedInactiveLimitWhileActive();

unsigned m_pageCount { 0 };

std::atomic<MemoryPressureStatus> m_memoryPressureStatus { MemoryPressureStatus::Normal };
bool m_installed { false };
bool m_isSimulatingMemoryPressure { false };
bool m_shouldLogMemoryMemoryPressureEvents { true };
bool m_hasInvokedDidExceedInactiveLimitWhileActiveCallback { false };

WebsamProcessState m_processState { WebsamProcessState::Inactive };

Expand All @@ -268,7 +264,6 @@ class MemoryPressureHandler {
std::unique_ptr<RunLoop::Timer<MemoryPressureHandler>> m_measurementTimer;
WTF::Function<void()> m_memoryKillCallback;
WTF::Function<void(MemoryPressureStatus)> m_memoryPressureStatusChangedCallback;
WTF::Function<void()> m_didExceedInactiveLimitWhileActiveCallback;
LowMemoryHandler m_lowMemoryHandler;

Configuration m_configuration;
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit/UIProcess/API/APIUIClient.h
Expand Up @@ -201,8 +201,6 @@ class UIClient {

virtual void imageOrMediaDocumentSizeChanged(const WebCore::IntSize&) { }

virtual void didExceedBackgroundResourceLimitWhileInForeground(WebKit::WebPageProxy&, WKResourceLimit) { }

virtual void didShowSafeBrowsingWarning() { }

virtual void confirmPDFOpening(WebKit::WebPageProxy&, const WTF::URL&, WebKit::FrameInfoData&&, CompletionHandler<void(bool)>&& completionHandler) { completionHandler(true); }
Expand Down
8 changes: 0 additions & 8 deletions Source/WebKit/UIProcess/API/C/WKPage.cpp
Expand Up @@ -1647,14 +1647,6 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient
m_client.hasVideoInPictureInPictureDidChange(toAPI(page), hasVideoInPictureInPicture, m_client.base.clientInfo);
}

void didExceedBackgroundResourceLimitWhileInForeground(WebPageProxy& page, WKResourceLimit limit) final
{
if (!m_client.didExceedBackgroundResourceLimitWhileInForeground)
return;

m_client.didExceedBackgroundResourceLimitWhileInForeground(toAPI(&page), limit, m_client.base.clientInfo);
}

void close(WebPageProxy* page) final
{
if (!m_client.close)
Expand Down
19 changes: 9 additions & 10 deletions Source/WebKit/UIProcess/API/C/WKPageUIClient.h
Expand Up @@ -131,7 +131,6 @@ typedef void (*WKFullscreenMayReturnToInlineCallback)(WKPageRef page, const void
typedef void (*WKRequestPointerLockCallback)(WKPageRef page, const void* clientInfo);
typedef void (*WKDidLosePointerLockCallback)(WKPageRef page, const void* clientInfo);
typedef void (*WKHasVideoInPictureInPictureDidChangeCallback)(WKPageRef page, bool hasVideoInPictureInPicture, const void* clientInfo);
typedef void (*WKDidExceedBackgroundResourceLimitWhileInForegroundCallback)(WKPageRef page, WKResourceLimit limit, const void* clientInfo);
typedef void (*WKPageDidResignInputElementStrongPasswordAppearanceCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
typedef bool (*WKPageShouldAllowDeviceOrientationAndMotionAccessCallback)(WKPageRef page, WKSecurityOriginRef securityOrigin, WKFrameInfoRef frame, const void *clientInfo);

Expand Down Expand Up @@ -944,7 +943,7 @@ typedef struct WKPageUIClientV10 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground
} WKPageUIClientV10;

typedef struct WKPageUIClientV11 {
Expand Down Expand Up @@ -1039,7 +1038,7 @@ typedef struct WKPageUIClientV11 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down Expand Up @@ -1137,7 +1136,7 @@ typedef struct WKPageUIClientV12 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down Expand Up @@ -1238,7 +1237,7 @@ typedef struct WKPageUIClientV13 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down Expand Up @@ -1342,7 +1341,7 @@ typedef struct WKPageUIClientV14 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down Expand Up @@ -1449,7 +1448,7 @@ typedef struct WKPageUIClientV15 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down Expand Up @@ -1560,7 +1559,7 @@ typedef struct WKPageUIClientV16 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down Expand Up @@ -1674,7 +1673,7 @@ typedef struct WKPageUIClientV17 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down Expand Up @@ -1790,7 +1789,7 @@ typedef struct WKPageUIClientV18 {

// Version 10.
WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
void* unused6; // Used to be didExceedBackgroundResourceLimitWhileInForeground

// Version 11.
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
Expand Down
1 change: 0 additions & 1 deletion Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
Expand Up @@ -302,7 +302,6 @@ struct UIEdgeInsets;
- (void)_webView:(WKWebView *)webView drawHeaderInRect:(CGRect)rect forPageWithTitle:(NSString *)title URL:(NSURL *)url WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webView drawFooterInRect:(CGRect)rect forPageWithTitle:(NSString *)title URL:(NSURL *)url WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webview mouseDidMoveOverElement:(_WKHitTestResult *)hitTestResult withFlags:(NSEventModifierFlags)flags userInfo:(id <NSSecureCoding>)userInfo;
- (void)_webView:(WKWebView *)webView didExceedBackgroundResourceLimitWhileInForeground:(_WKResourceLimit)limit WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webView setResizable:(BOOL)isResizable WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webView getWindowFrameWithCompletionHandler:(void (^)(CGRect))completionHandler WK_API_AVAILABLE(macos(10.13.4));
- (void)_webView:(WKWebView *)webView setWindowFrame:(CGRect)frame WK_API_AVAILABLE(macos(10.13.4));
Expand Down
2 changes: 0 additions & 2 deletions Source/WebKit/UIProcess/Cocoa/UIDelegate.h
Expand Up @@ -137,7 +137,6 @@ class UIDelegate : public CanMakeWeakPtr<UIDelegate> {
void didClickAutoFillButton(WebPageProxy&, API::Object*) final;
void toolbarsAreVisible(WebPageProxy&, Function<void(bool)>&&) final;
bool runOpenPanel(WebPageProxy&, WebFrameProxy*, FrameInfoData&&, API::OpenPanelParameters*, WebOpenPanelResultListenerProxy*) final;
void didExceedBackgroundResourceLimitWhileInForeground(WebPageProxy&, WKResourceLimit) final;
void saveDataToFileInDownloadsFolder(WebPageProxy*, const WTF::String&, const WTF::String&, const URL&, API::Data&) final;
Ref<API::InspectorConfiguration> configurationForLocalInspector(WebPageProxy&, WebInspectorUIProxy&) final;
void didAttachLocalInspector(WebPageProxy&, WebInspectorUIProxy&) final;
Expand Down Expand Up @@ -230,7 +229,6 @@ class UIDelegate : public CanMakeWeakPtr<UIDelegate> {
bool webViewDrawFooterInRectForPageWithTitleURL : 1;
bool webViewGetWindowFrameWithCompletionHandler : 1;
bool webViewGetToolbarsAreVisibleWithCompletionHandler : 1;
bool webViewDidExceedBackgroundResourceLimitWhileInForeground : 1;
bool webViewSaveDataToFileSuggestedFilenameMimeTypeOriginatingURL : 1;
bool webViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler : 1;
bool webViewConfigurationForLocalInspector : 1;
Expand Down
28 changes: 0 additions & 28 deletions Source/WebKit/UIProcess/Cocoa/UIDelegate.mm
Expand Up @@ -140,7 +140,6 @@
m_delegateMethods.webViewDrawFooterInRectForPageWithTitleURL = [delegate respondsToSelector:@selector(_webView:drawFooterInRect:forPageWithTitle:URL:)];
m_delegateMethods.webViewHeaderHeight = [delegate respondsToSelector:@selector(_webViewHeaderHeight:)];
m_delegateMethods.webViewFooterHeight = [delegate respondsToSelector:@selector(_webViewFooterHeight:)];
m_delegateMethods.webViewDidExceedBackgroundResourceLimitWhileInForeground = [delegate respondsToSelector:@selector(_webView:didExceedBackgroundResourceLimitWhileInForeground:)];
m_delegateMethods.webViewSaveDataToFileSuggestedFilenameMimeTypeOriginatingURL = [delegate respondsToSelector:@selector(_webView:saveDataToFile:suggestedFilename:mimeType:originatingURL:)];
m_delegateMethods.webViewRunOpenPanelWithParametersInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewConfigurationForLocalInspector = [delegate respondsToSelector:@selector(_webView:configurationForLocalInspector:)];
Expand Down Expand Up @@ -943,33 +942,6 @@ static _WKAutoplayEvent toWKAutoplayEvent(WebCore::AutoplayEvent event)
[(id <WKUIDelegatePrivate>)delegate _unfocusWebView:m_uiDelegate->m_webView.get().get()];
}

static _WKResourceLimit toWKResourceLimit(WKResourceLimit limit)
{
switch (limit) {
case kWKResourceLimitMemory:
return _WKResourceLimitMemory;
case kWKResourceLimitCPU:
return _WKResourceLimitCPU;
}
ASSERT_NOT_REACHED();
return _WKResourceLimitMemory;
}

void UIDelegate::UIClient::didExceedBackgroundResourceLimitWhileInForeground(WebPageProxy&, WKResourceLimit limit)
{
if (!m_uiDelegate)
return;

if (!m_uiDelegate->m_delegateMethods.webViewDidExceedBackgroundResourceLimitWhileInForeground)
return;

auto delegate = m_uiDelegate->m_delegate.get();
if (!delegate)
return;

[static_cast<id <WKUIDelegatePrivate>>(delegate) _webView:m_uiDelegate->m_webView.get().get() didExceedBackgroundResourceLimitWhileInForeground:toWKResourceLimit(limit)];
}

void UIDelegate::UIClient::didNotHandleWheelEvent(WebPageProxy*, const NativeWebWheelEvent& event)
{
if (!m_uiDelegate)
Expand Down
12 changes: 0 additions & 12 deletions Source/WebKit/UIProcess/WebPageProxy.cpp
Expand Up @@ -10253,18 +10253,6 @@ void WebPageProxy::playbackTargetPickerWasDismissed(PlaybackTargetClientContextI
}
#endif

void WebPageProxy::didExceedInactiveMemoryLimitWhileActive()
{
WEBPAGEPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedInactiveMemoryLimitWhileActive");
m_uiClient->didExceedBackgroundResourceLimitWhileInForeground(*this, kWKResourceLimitMemory);
}

void WebPageProxy::didExceedBackgroundCPULimitWhileInForeground()
{
WEBPAGEPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedBackgroundCPULimitWhileInForeground");
m_uiClient->didExceedBackgroundResourceLimitWhileInForeground(*this, kWKResourceLimitCPU);
}

void WebPageProxy::didChangeBackgroundColor()
{
pageClient().didChangeBackgroundColor();
Expand Down
3 changes: 0 additions & 3 deletions Source/WebKit/UIProcess/WebPageProxy.h
Expand Up @@ -673,9 +673,6 @@ class WebPageProxy final : public API::ObjectImpl<API::Object::Type::Page>
void setIsUsingHighPerformanceWebGL(bool value) { m_isUsingHighPerformanceWebGL = value; }
bool isUsingHighPerformanceWebGL() const { return m_isUsingHighPerformanceWebGL; }

void didExceedInactiveMemoryLimitWhileActive();
void didExceedBackgroundCPULimitWhileInForeground();

void closePage();

void addPlatformLoadParameters(WebProcessProxy&, LoadParameters&);
Expand Down
18 changes: 3 additions & 15 deletions Source/WebKit/UIProcess/WebProcessProxy.cpp
Expand Up @@ -1592,12 +1592,6 @@ void WebProcessProxy::logDiagnosticMessageForResourceLimitTermination(const Stri
(*pages().begin())->logDiagnosticMessage(DiagnosticLoggingKeys::simulatedPageCrashKey(), limitKey, ShouldSample::No);
}

void WebProcessProxy::didExceedInactiveMemoryLimitWhileActive()
{
for (auto& page : pages())
page->didExceedInactiveMemoryLimitWhileActive();
}

void WebProcessProxy::didExceedActiveMemoryLimit()
{
WEBPROCESSPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedActiveMemoryLimit: Terminating WebProcess because it has exceeded the active memory limit");
Expand Down Expand Up @@ -1626,20 +1620,14 @@ void WebProcessProxy::didExceedCPULimit()
WEBPROCESSPROXY_RELEASE_LOG(PerformanceLogging, "didExceedCPULimit: WebProcess has exceeded the background CPU limit but we are not terminating it because it is capturing audio / video");
return;
}
}

bool hasVisiblePage = false;
for (auto& page : pages()) {
if (page->isViewVisible()) {
page->didExceedBackgroundCPULimitWhileInForeground();
hasVisiblePage = true;
// We only notify the client that the process exceeded the CPU limit when it is visible, we do not terminate it.
WEBPROCESSPROXY_RELEASE_LOG(PerformanceLogging, "didExceedCPULimit: WebProcess has exceeded the background CPU limit but we are not terminating it because it has a visible page");
return;
}
}

// We only notify the client that the process exceeded the CPU limit when it is visible, we do not terminate it.
if (hasVisiblePage)
return;

WEBPROCESSPROXY_RELEASE_LOG_ERROR(PerformanceLogging, "didExceedCPULimit: Terminating background WebProcess that has exceeded the background CPU limit");
logDiagnosticMessageForResourceLimitTermination(DiagnosticLoggingKeys::exceededBackgroundCPULimitKey());
requestTermination(ProcessTerminationReason::ExceededCPULimit);
Expand Down
1 change: 0 additions & 1 deletion Source/WebKit/UIProcess/WebProcessProxy.h
Expand Up @@ -289,7 +289,6 @@ class WebProcessProxy : public AuxiliaryProcessProxy, private ProcessThrottlerCl

void memoryPressureStatusChanged(bool isUnderMemoryPressure) { m_isUnderMemoryPressure = isUnderMemoryPressure; }
bool isUnderMemoryPressure() const { return m_isUnderMemoryPressure; }
void didExceedInactiveMemoryLimitWhileActive();

void processTerminated();

Expand Down
1 change: 0 additions & 1 deletion Source/WebKit/UIProcess/WebProcessProxy.messages.in
Expand Up @@ -47,7 +47,6 @@ messages -> WebProcessProxy LegacyReceiver {
DidReceiveBackgroundResponsivenessPing()

MemoryPressureStatusChanged(bool isUnderMemoryPressure)
DidExceedInactiveMemoryLimitWhileActive()

DidCollectPrewarmInformation(WebCore::RegistrableDomain domain, struct WebCore::PrewarmInformation prewarmInformation)

Expand Down
8 changes: 0 additions & 8 deletions Source/WebKit/WebProcess/WebProcess.cpp
Expand Up @@ -463,14 +463,6 @@ void WebProcess::initializeWebProcess(WebProcessCreationParameters&& parameters)
else
parentProcessConnection()->send(Messages::WebProcessProxy::DidExceedInactiveMemoryLimit(), 0);
});
memoryPressureHandler.setDidExceedInactiveLimitWhileActiveCallback([this] () {
parentProcessConnection()->send(Messages::WebProcessProxy::DidExceedInactiveMemoryLimitWhileActive(), 0);

if (!m_loggedProcessLimitCriticalMemoryStatistics) {
m_loggedProcessLimitCriticalMemoryStatistics = true;
scheduleLogMemoryStatistics(LogMemoryStatisticsReason::CriticalMemoryPressureNotification);
}
});
#endif
memoryPressureHandler.setMemoryPressureStatusChangedCallback([this](WTF::MemoryPressureStatus memoryPressureStatus) {
if (parentProcessConnection())
Expand Down

0 comments on commit cb6582e

Please sign in to comment.