Changeset 269934 in webkit
- Timestamp:
- Nov 17, 2020 4:36:12 PM (3 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r269928 r269934 1 2020-11-17 Chris Dumez <cdumez@apple.com> 2 3 Make sure ProcessThrottler is always holding a ProcessAssertion for its child process 4 https://bugs.webkit.org/show_bug.cgi?id=219053 5 6 Reviewed by Geoff Garen. 7 8 Make sure ProcessThrottler is always holding a ProcessAssertion for its child process. Previously, when changing the assertion 9 type (e.g. when going from background to foreground) we would release the previous assertion and then take the new one. 10 11 RunningBoard developers recommend that we wait until the new ProcessAssertion is taken before we release the previous one to 12 avoid churn. It is also important we always hold a ProcessAssertion at all times for the child process because the child process 13 may exit otherwise. 14 15 * UIProcess/ProcessThrottler.cpp: 16 (WebKit::ProcessThrottler::setAssertionType): 17 1 18 2020-11-17 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/WebKit/UIProcess/ProcessThrottler.cpp
r265162 r269934 128 128 129 129 PROCESSTHROTTLER_RELEASE_LOG("setAssertionType: Updating process assertion type to %u (foregroundActivities: %u, backgroundActivities: %u)", newType, m_foregroundActivities.size(), m_backgroundActivities.size()); 130 131 // Keep the previous assertion around until after the new one has been created so that we always hold 132 // a process assertion for the process. 133 auto previousAssertion = std::exchange(m_assertion, nullptr); 130 134 if (m_shouldTakeUIBackgroundAssertion) { 131 135 auto assertion = makeUnique<ProcessAndUIAssertion>(m_processIdentifier, assertionName(newType), newType);
Note: See TracChangeset
for help on using the changeset viewer.