RESOLVED FIXED 211297
[iOS] ProcessThrottler fails to re-take ProcessAssertion if the previous one was invalidated
https://bugs.webkit.org/show_bug.cgi?id=211297
Summary [iOS] ProcessThrottler fails to re-take ProcessAssertion if the previous one ...
Chris Dumez
Reported 2020-05-01 09:53:57 PDT
Our ProcessAssertions may get invalidated upon backgrounding of the app. When the app becomes foreground and the ProcessThrottler tries to take a Foreground assertion as a result, it would incorrectly think it already had such assertion and not do anything, even though the previous one is no longer valid. As a result, the child processes would stay suspended even though the app was foregrounded.
Attachments
Patch (8.64 KB, patch)
2020-05-01 09:57 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2020-05-01 09:54:08 PDT
Chris Dumez
Comment 2 2020-05-01 09:57:24 PDT
Chris Dumez
Comment 3 2020-05-01 15:57:05 PDT
Comment on attachment 398194 [details] Patch Clearing flags on attachment: 398194 Committed r261034: <https://trac.webkit.org/changeset/261034>
Chris Dumez
Comment 4 2020-05-01 15:57:07 PDT
All reviewed patches have been landed. Closing bug.
Brent Fulgham
Comment 5 2020-05-01 15:59:59 PDT
Comment on attachment 398194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398194&action=review > Source/WebKit/ChangeLog:15 > + To address the issue, add a isValid() method to ProcessAssertion() and check it in "add an isValid() ..." > Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:462 > + bool shouldHoldBackgroundTask = isValid() && type() != ProcessAssertionType::Suspended; It seems like this might be the only use of validity(). Should it be removed?
Chris Dumez
Comment 6 2020-05-01 16:01:58 PDT
Comment on attachment 398194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=398194&action=review > Source/WebKit/UIProcess/ProcessAssertion.h:-77 > - Validity validity() const { return m_validity; } See removal here. >> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:462 >> + bool shouldHoldBackgroundTask = isValid() && type() != ProcessAssertionType::Suspended; > > It seems like this might be the only use of validity(). Should it be removed? It was removed.
Note You need to log in before you can comment on or make changes to this bug.