Bug 219053 - Make sure ProcessThrottler is always holding a ProcessAssertion for its child process
Summary: Make sure ProcessThrottler is always holding a ProcessAssertion for its child...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-17 14:37 PST by Chris Dumez
Modified: 2020-11-17 16:37 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.35 KB, patch)
2020-11-17 14:39 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.34 KB, patch)
2020-11-17 15:00 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-11-17 14:37:50 PST
Make sure ProcessThrottler is always holding a ProcessAssertion for its child process. Previously, when changing the assertion type (e.g. when going from background to foreground) we would release the previous assertion and then take the new one.
RunningBoard developers recommend that we wait until the new ProcessAssertion is taken before we release the previous one to avoid churn. It is also important we always hold a ProcessAssertion at all times for the child process because the child process may exit otherwise.
Comment 1 Chris Dumez 2020-11-17 14:39:18 PST
Created attachment 414386 [details]
Patch
Comment 2 Geoffrey Garen 2020-11-17 14:58:25 PST
Comment on attachment 414386 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=414386&action=review

r=me

> Source/WebKit/UIProcess/ProcessThrottler.cpp:132
> +    // Keep the previous assertion around until after the new one has been created so that we always have
> +    // hold a process assertion for the process.

have hold => hold
Comment 3 Chris Dumez 2020-11-17 15:00:53 PST
Created attachment 414388 [details]
Patch
Comment 4 EWS 2020-11-17 16:36:33 PST
Committed r269934: <https://trac.webkit.org/changeset/269934>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 414388 [details].
Comment 5 Radar WebKit Bug Importer 2020-11-17 16:37:20 PST
<rdar://problem/71512123>