Skip to content

Commit

Permalink
Cherry-pick b4a103a. rdar://problem/102994291
Browse files Browse the repository at this point in the history
    [iOS] 256753@main breaks YouTube sign in
    https://bugs.webkit.org/show_bug.cgi?id=248825
    rdar://102994291

    Reviewed by Chris Dumez.

    256753@main breaks YouTube Sign in. Reverting source changes but not
    test changes.

    * Source/WebKit/UIProcess/ProcessThrottler.cpp:
    (WebKit::ProcessThrottler::setThrottleState):

    Canonical link: https://commits.webkit.org/257477@main

Canonical link: https://commits.webkit.org/257350.4@safari-7615.1.14-branch
  • Loading branch information
salinas-miguel authored and MyahCobbs committed Dec 7, 2022
1 parent a6717bf commit 72e7b85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/WebKit/UIProcess/ProcessThrottler.cpp
Expand Up @@ -159,9 +159,6 @@ std::optional<ProcessAssertionType> ProcessThrottler::assertionTypeForState(Proc

void ProcessThrottler::setThrottleState(ProcessThrottleState newState)
{
if (m_state == newState && (m_assertion && m_assertion->isValid()))
return;

m_state = newState;
m_process.didChangeThrottleState(newState);

Expand All @@ -173,6 +170,9 @@ void ProcessThrottler::setThrottleState(ProcessThrottleState newState)
return;
}

if (m_assertion && m_assertion->isValid() && m_assertion->type() == newType)
return;

PROCESSTHROTTLER_RELEASE_LOG("setThrottleState: Updating process assertion type to %u (foregroundActivities=%u, backgroundActivities=%u)", newType, m_foregroundActivities.size(), m_backgroundActivities.size());

// Keep the previous assertion active until the new assertion is taken asynchronously.
Expand Down

0 comments on commit 72e7b85

Please sign in to comment.