[iOS] The network process sometimes gets killed for trying to suspend while holding...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2019 18:27:42 +0000 (18:27 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2019 18:27:42 +0000 (18:27 +0000)
commitb81a5deaf886f9aa22a6cd809da8584829dbf76b
tree735bffaf49e6a85fae3092b3aed26e2aceb3e3f5
parent9a92c45c4058b6be5bed925313414e309c82cc7b
[iOS] The network process sometimes gets killed for trying to suspend while holding locked files
https://bugs.webkit.org/show_bug.cgi?id=195890
<rdar://problem/48934338>

Reviewed by Geoffrey Garen.

The network process sometimes gets killed for trying to suspend while holding locked files while
under SQLiteDatabase::open(). The SQLiteDatabaseTracker normally keeps tracking of "transactions"
in progress so we know that we're holding locked files and the WebSQLiteDatabaseTracker takes
care of notifying the UIProcess via IPC that it should hold a background assertion on our behalf
to avoid trying to suspend while holding locked files.
However, we were missing a SQLiteTransactionInProgressAutoCounter when trying to execute the
PRAGMA statement.

Note that we have a similar SQLiteTransactionInProgressAutoCounter in SQLiteDatabase::useWALJournalMode()
when executing such PRAGMA statement already.

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::open):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/sql/SQLiteDatabase.cpp