Changeset 202379 in webkit
- Timestamp:
- Jun 23, 2016 9:03:18 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r202378 r202379 1 2016-06-23 Chris Dumez <cdumez@apple.com> 2 3 Only call sqlite3_initialize() when a SQLite database is actually being opened 4 https://bugs.webkit.org/show_bug.cgi?id=159033 5 6 Reviewed by Brady Eidson. 7 8 Only call sqlite3_initialize() when a SQLite database is actually being opened 9 instead of doing it unconditionally. sqlite3_initialize() was previously called 10 in the SQLiteDatabase constructor which gets called on WebContent process 11 initialization because a DatabaseTracker is constructed on initialization and 12 DatabaseTracker has a SQLiteDatabase data member. 13 14 * platform/sql/SQLiteDatabase.cpp: 15 (WebCore::initializeSQLiteIfNecessary): 16 (WebCore::SQLiteDatabase::open): 17 (WebCore::SQLiteDatabase::SQLiteDatabase): Deleted. 18 * platform/sql/SQLiteDatabase.h: 19 1 20 2016-06-23 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 21 -
trunk/Source/WebCore/platform/sql/SQLiteDatabase.cpp
r200322 r202379 50 50 } 51 51 52 SQLiteDatabase::SQLiteDatabase() 53 : m_db(0) 54 , m_pageSize(-1) 55 , m_transactionInProgress(false) 56 , m_sharable(false) 57 , m_openingThread(0) 58 , m_openError(SQLITE_ERROR) 59 , m_openErrorMessage() 60 , m_lastChangesCount(0) 52 static void initializeSQLiteIfNecessary() 61 53 { 62 54 static std::once_flag flag; … … 78 70 } 79 71 72 SQLiteDatabase::SQLiteDatabase() = default; 73 80 74 SQLiteDatabase::~SQLiteDatabase() 81 75 { … … 85 79 bool SQLiteDatabase::open(const String& filename, bool forWebSQLDatabase) 86 80 { 81 initializeSQLiteIfNecessary(); 82 87 83 close(); 88 84 -
trunk/Source/WebCore/platform/sql/SQLiteDatabase.h
r200322 r202379 146 146 void overrideUnauthorizedFunctions(); 147 147 148 sqlite3* m_db ;149 int m_pageSize ;148 sqlite3* m_db { nullptr }; 149 int m_pageSize { -1 }; 150 150 151 bool m_transactionInProgress ;152 bool m_sharable ;151 bool m_transactionInProgress { false }; 152 bool m_sharable { false }; 153 153 154 154 Lock m_authorizerLock; … … 156 156 157 157 Lock m_lockingMutex; 158 ThreadIdentifier m_openingThread ;158 ThreadIdentifier m_openingThread { 0 }; 159 159 160 160 Lock m_databaseClosingMutex; 161 161 162 int m_openError ;162 int m_openError { SQLITE_ERROR }; 163 163 CString m_openErrorMessage; 164 164 165 int m_lastChangesCount ;165 int m_lastChangesCount { 0 }; 166 166 }; 167 167
Note: See TracChangeset
for help on using the changeset viewer.