diff options
author | Patrick Scott <phanna@android.com> | 2009-07-09 14:55:03 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2009-07-09 14:58:42 -0400 |
commit | 91f07d3317527703031378a388bc92853479d6a8 (patch) | |
tree | 23e6eb6b3e0a63512330f40a87781fd2d85fa3b4 /WebCore | |
parent | b116c1a08412db8a748998c7e8a2ce851cbacacd (diff) | |
download | external_webkit-91f07d3317527703031378a388bc92853479d6a8.zip external_webkit-91f07d3317527703031378a388bc92853479d6a8.tar.gz external_webkit-91f07d3317527703031378a388bc92853479d6a8.tar.bz2 |
Do not merge
Pull down http://trac.webkit.org/changeset/42163 to fix the icon database crash.
I believe the issue was that m_syncThreadRunning could have been initialized to
false if the moons aligned. When the Browser quits, it closes the icon db. If
m_syncThreadRunning happened to be false, the close method would not wait for
the sync thread to complete before cleaning up (and closing) the sqlite
database. I think that caused the underlying db to be null within sqlite.
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/loader/icon/IconDatabase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/WebCore/loader/icon/IconDatabase.cpp b/WebCore/loader/icon/IconDatabase.cpp index 5705f7a..a5ea523 100644 --- a/WebCore/loader/icon/IconDatabase.cpp +++ b/WebCore/loader/icon/IconDatabase.cpp @@ -150,6 +150,7 @@ bool IconDatabase::open(const String& databasePath) // completes and m_syncThreadRunning is properly set m_syncLock.lock(); m_syncThread = createThread(IconDatabase::iconDatabaseSyncThreadStart, this, "WebCore::IconDatabase"); + m_syncThreadRunning = m_syncThread; m_syncLock.unlock(); if (!m_syncThread) return false; @@ -2026,6 +2027,7 @@ void IconDatabase::writeIconSnapshotToSQLDatabase(const IconSnapshot& snapshot) } else { readySQLiteStatement(m_setIconInfoStatement, m_syncDB, "INSERT INTO IconInfo (url,stamp) VALUES (?, ?);"); m_setIconInfoStatement->bindText(1, snapshot.iconURL); + m_setIconInfoStatement->m_statement = 0; m_setIconInfoStatement->bindInt64(2, snapshot.timestamp); if (m_setIconInfoStatement->step() != SQLResultDone) |