Skip to content

Commit

Permalink
Avoid taking near suspended assertion in processes with no pages
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270252
rdar://123788018

Reviewed by Chris Dumez.

In 272937@main, we stopped taking the near suspended assertion by default in most cases. However, I
forgot to change WebProcessProxy::shouldTakeNearSuspendedAssertion() to consult that default value
in the no page case. This fixes that issue.

* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::shouldTakeNearSuspendedAssertion const):

Canonical link: https://commits.webkit.org/275509@main
  • Loading branch information
bnham committed Feb 29, 2024
1 parent ce71cfe commit 94b54aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/WebKit/UIProcess/WebProcessProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,8 @@ bool WebProcessProxy::shouldTakeNearSuspendedAssertion() const
#if USE(RUNNINGBOARD)
if (m_pageMap.isEmpty()) {
// The setting come from pages but this process has no page, we thus use the default
// setting value, which is true.
return true;
// setting value.
return defaultShouldTakeNearSuspendedAssertion();
}

for (auto& page : m_pageMap.values()) {
Expand Down

0 comments on commit 94b54aa

Please sign in to comment.