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.
<rdar://problem/62542463>
Created attachment 398194 [details] Patch
Comment on attachment 398194 [details] Patch Clearing flags on attachment: 398194 Committed r261034: <https://trac.webkit.org/changeset/261034>
All reviewed patches have been landed. Closing bug.
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?
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.