| Summary: | [iOS] WebProcess needs to take a background task assertion to prevent being killed for "suspended with locked system files" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||
| Component: | WebKit2 | Assignee: | Daniel Bates <dbates> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aestes, andersca, ap, barraclough, beidson, ddkilzer, sam, thorton | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | iPhone / iPad | ||||||
| OS: | iOS 8.1 | ||||||
| Attachments: |
|
||||||
|
Description
Daniel Bates
2014-10-28 16:02:38 PDT
Created attachment 240575 [details]
Patch
I open to suggestions on this patch. The class WebSQLiteDatabaseTracker (included in the patch) isn't specific to iOS and hence can be used by other ports. At the time of writing, the iOS port is the only port that implements a non-trivial ProcessAssertion class to acquire a background task assertion. I guarded the instantiation of this class with PLATFORM(IOS) though I placed the class files in Source/WebKit2/WebProcess/WebCoreSupport/ (should I move them to an iOS-specific directory?) because I was unclear if it was acceptable to instantiate for all ports a WebSQLiteDatabaseTracker, which would send messages to the UIProcess (*), given that iOS is the only port that makes use of such messages. I was also unclear if we should either add a new compile-time guard for this feature to avoid the instantiation on non-iOS ports, say ENABLE_SQL_DATABASE_TRACKER, or if it's acceptable to instantiate WebSQLiteDatabaseTracker for all ports and have it only enabled for iOS (say, by not calling SQLDatabaseTracker::setClient() on non-iOS ports). Let me know if there is a preferred way to expose this functionality. (*) I didn't measure the performance implications of such messaging. Comment on attachment 240575 [details] Patch Clearing flags on attachment: 240575 Committed r175698: <http://trac.webkit.org/changeset/175698> All reviewed patches have been landed. Closing bug. |