WKProcessAssertionBackgroundTaskManager incorrectly ignores expiration notifications for daemons, because it rely on visibility to make decisions.
Created attachment 400770 [details] Patch
Created attachment 400771 [details] Patch
Created attachment 400825 [details] Patch
Created attachment 400828 [details] Patch
Created attachment 400830 [details] Patch
Comment on attachment 400830 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400830&action=review > Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:53 > + return [[[RBSProcessHandle currentProcess] activeLimitations] runTime] != RBSProcessTimeLimitationNone; It might be worth putting this inside a std::call_once, because this should never change, right? > Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:241 > + auto remainingTime = [[[RBSProcessHandle currentProcess] activeLimitations] runTime]; Can we use dot syntax for any of this?
Comment on attachment 400830 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400830&action=review >> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:53 >> + return [[[RBSProcessHandle currentProcess] activeLimitations] runTime] != RBSProcessTimeLimitationNone; > > It might be worth putting this inside a std::call_once, because this should never change, right? It totally changes. For example, for applications, based on app visibility. The timer should only get started after the app gets backgrounded and thus this would return RBSProcessTimeLimitationNone when foreground and a positive value when background. >> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:241 >> + auto remainingTime = [[[RBSProcessHandle currentProcess] activeLimitations] runTime]; > > Can we use dot syntax for any of this? ok
Created attachment 400875 [details] Patch
Committed r262477: <https://trac.webkit.org/changeset/262477> All reviewed patches have been landed. Closing bug and clearing flags on attachment 400875 [details].
<rdar://problem/63909510>