NEW 157184
[iOS] Make Database::close() non-blocking
https://bugs.webkit.org/show_bug.cgi?id=157184
Summary [iOS] Make Database::close() non-blocking
Daniel Bates
Reported 2016-04-29 09:35:42 PDT
We should make Database::close() non-blocking. On iOS we depend on it blocking until it closes a database as part of closing all databases (by calling DatabaseTracker::closeAllDatabases()) in our process assertion expiration handler. Specifically we depend on Database::close() blocking so as to prevent returning from the process assertion expiration handler before all databases are closed as the process will be suspended immediately on completion of the process assertion expiration handler. In WebKit1 the logic for the process expiration handler happens in -[WebDatabaseManager startBackgroundTask], <http://trac.webkit.org/browser/trunk/Source/WebKit/mac/Storage/WebDatabaseManager.mm?rev=199309#L272>. In WebKit2 this happens in WebProcess::processWillSuspendImminently(), <http://trac.webkit.org/browser/trunk/Source/WebKit2/WebProcess/WebProcess.cpp?rev=199842#L1241>.
Attachments
Note You need to log in before you can comment on or make changes to this bug.