Changeset 242983 in webkit
- Timestamp:
- Mar 14, 2019, 6:54:22 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/sql/SQLiteDatabase.cpp (modified) (4 diffs)
-
platform/sql/SQLiteDatabase.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r242981 r242983 1 2019-03-14 Sihui Liu <sihui_liu@apple.com> 2 3 Web process is put to suspended when holding locked WebSQL files 4 https://bugs.webkit.org/show_bug.cgi?id=195768 5 6 Reviewed by Geoffrey Garen. 7 8 We need to keep processes active during database close, because SQLite database may run a checkpoint operation 9 and lock database files. 10 11 * platform/sql/SQLiteDatabase.cpp: 12 (WebCore::SQLiteDatabase::useWALJournalMode): 13 (WebCore::SQLiteDatabase::close): 14 * platform/sql/SQLiteDatabase.h: 15 1 16 2019-03-14 Brent Fulgham <bfulgham@apple.com> 2 17 -
trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp
r242307 r242983 31 31 #include "Logging.h" 32 32 #include "MemoryRelease.h" 33 #include "SQLiteDatabaseTracker.h" 33 34 #include "SQLiteFileSystem.h" 34 35 #include "SQLiteStatement.h" … … 134 135 void SQLiteDatabase::useWALJournalMode() 135 136 { 137 m_useWAL = true; 136 138 { 137 139 SQLiteStatement walStatement(*this, "PRAGMA journal_mode=WAL;"_s); … … 147 149 148 150 { 151 SQLiteTransactionInProgressAutoCounter transactionCounter; 149 152 SQLiteStatement checkpointStatement(*this, "PRAGMA wal_checkpoint(TRUNCATE)"_s); 150 153 if (checkpointStatement.prepareAndStep() == SQLITE_ROW) { … … 166 169 m_db = 0; 167 170 } 168 sqlite3_close(db); 171 if (m_useWAL) { 172 SQLiteTransactionInProgressAutoCounter transactionCounter; 173 sqlite3_close(db); 174 } else 175 sqlite3_close(db); 169 176 } 170 177 -
trunk/Source/WebCore/platform/sql/SQLiteDatabase.h
r242406 r242983 156 156 bool m_sharable { false }; 157 157 #endif 158 158 159 bool m_useWAL { false }; 160 159 161 Lock m_authorizerLock; 160 162 RefPtr<DatabaseAuthorizer> m_authorizer;
Note:
See TracChangeset
for help on using the changeset viewer.